public class EventDrivenPollingConsumer extends PollingConsumerSupport implements org.apache.camel.Processor, org.apache.camel.IsSingleton
PollingConsumer
which uses the normal
asynchronous consumer mechanism along with a BlockingQueue
to allow
the caller to pull messages on demand.Constructor and Description |
---|
EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint) |
EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint,
BlockingQueue<org.apache.camel.Exchange> queue) |
EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint,
int queueSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterPoll() |
protected long |
beforePoll(long timeout) |
protected org.apache.camel.Consumer |
createConsumer() |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
long |
getBlockTimeout() |
protected org.apache.camel.Consumer |
getConsumer() |
org.apache.camel.Consumer |
getDelegateConsumer() |
org.apache.camel.spi.ExceptionHandler |
getInterruptedExceptionHandler() |
org.apache.camel.Processor |
getProcessor() |
int |
getQueueCapacity()
Gets the queue capacity.
|
int |
getQueueSize()
Gets the current queue size (no of elements in the queue).
|
protected void |
handleInterruptedException(InterruptedException e) |
boolean |
isBlockWhenFull() |
boolean |
isSingleton() |
void |
process(org.apache.camel.Exchange exchange) |
org.apache.camel.Exchange |
receive() |
org.apache.camel.Exchange |
receive(long timeout) |
org.apache.camel.Exchange |
receiveNoWait() |
void |
setBlockTimeout(long blockTimeout) |
void |
setBlockWhenFull(boolean blockWhenFull) |
void |
setInterruptedExceptionHandler(org.apache.camel.spi.ExceptionHandler interruptedExceptionHandler) |
getEndpoint, getExceptionHandler, handleException, setExceptionHandler, toString
doInit, doResume, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint)
public EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint, int queueSize)
public EventDrivenPollingConsumer(org.apache.camel.Endpoint endpoint, BlockingQueue<org.apache.camel.Exchange> queue)
public org.apache.camel.Processor getProcessor()
getProcessor
in interface org.apache.camel.Consumer
getProcessor
in class PollingConsumerSupport
public boolean isBlockWhenFull()
public void setBlockWhenFull(boolean blockWhenFull)
public long getBlockTimeout()
public void setBlockTimeout(long blockTimeout)
public int getQueueCapacity()
public int getQueueSize()
public org.apache.camel.Exchange receiveNoWait()
receiveNoWait
in interface org.apache.camel.PollingConsumer
public org.apache.camel.Exchange receive()
receive
in interface org.apache.camel.PollingConsumer
public org.apache.camel.Exchange receive(long timeout)
receive
in interface org.apache.camel.PollingConsumer
public void process(org.apache.camel.Exchange exchange) throws Exception
process
in interface org.apache.camel.Processor
Exception
public org.apache.camel.spi.ExceptionHandler getInterruptedExceptionHandler()
public void setInterruptedExceptionHandler(org.apache.camel.spi.ExceptionHandler interruptedExceptionHandler)
public org.apache.camel.Consumer getDelegateConsumer()
protected void handleInterruptedException(InterruptedException e)
protected long beforePoll(long timeout)
protected void afterPoll()
protected org.apache.camel.Consumer getConsumer()
protected org.apache.camel.Consumer createConsumer() throws Exception
Exception
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.ServiceSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.ServiceSupport
Exception
protected void doShutdown() throws Exception
doShutdown
in class org.apache.camel.support.service.ServiceSupport
Exception
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
Apache Camel