public class DefaultAsyncProcessorAwaitManager
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.AsyncProcessorAwaitManager, org.apache.camel.StaticService
Constructor and Description |
---|
DefaultAsyncProcessorAwaitManager() |
Modifier and Type | Method and Description |
---|---|
void |
await(org.apache.camel.Exchange exchange,
CountDownLatch latch) |
Collection<org.apache.camel.spi.AsyncProcessorAwaitManager.AwaitThread> |
browse() |
void |
countDown(org.apache.camel.Exchange exchange,
CountDownLatch latch) |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.spi.AsyncProcessorAwaitManager.Statistics |
getStatistics() |
void |
interrupt(org.apache.camel.Exchange exchange) |
void |
interrupt(String exchangeId) |
boolean |
isInterruptThreadsWhileStopping() |
void |
process(org.apache.camel.AsyncProcessor processor,
org.apache.camel.Exchange exchange)
Calls the async version of the processor's process method and waits
for it to complete before returning.
|
void |
setInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping) |
int |
size() |
build, doBuild, doInit, doResume, doShutdown, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public void process(org.apache.camel.AsyncProcessor processor, org.apache.camel.Exchange exchange)
AsyncProcessor
objects to implement their sync version of the process method.
Important: This method is discouraged to be used, as its better to invoke the asynchronous
AsyncProcessor.process(org.apache.camel.Exchange, org.apache.camel.AsyncCallback)
method, whenever possible.process
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
processor
- the processorexchange
- the exchangepublic void await(org.apache.camel.Exchange exchange, CountDownLatch latch)
public void countDown(org.apache.camel.Exchange exchange, CountDownLatch latch)
public int size()
size
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public Collection<org.apache.camel.spi.AsyncProcessorAwaitManager.AwaitThread> browse()
browse
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public void interrupt(String exchangeId)
interrupt
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public void interrupt(org.apache.camel.Exchange exchange)
interrupt
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public boolean isInterruptThreadsWhileStopping()
isInterruptThreadsWhileStopping
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public void setInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping)
setInterruptThreadsWhileStopping
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
public org.apache.camel.spi.AsyncProcessorAwaitManager.Statistics getStatistics()
getStatistics
in interface org.apache.camel.spi.AsyncProcessorAwaitManager
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.ServiceSupport
Exception
Apache Camel