Package org.apache.camel.impl.engine
Class DefaultAsyncProcessorAwaitManager
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.AsyncProcessorAwaitManager,org.apache.camel.StatefulService,org.apache.camel.StaticService,org.apache.camel.SuspendableService
public class DefaultAsyncProcessorAwaitManager extends org.apache.camel.support.service.ServiceSupport implements org.apache.camel.spi.AsyncProcessorAwaitManager, org.apache.camel.StaticService
-
-
Constructor Summary
Constructors Constructor Description DefaultAsyncProcessorAwaitManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawait(org.apache.camel.Exchange exchange, CountDownLatch latch)Collection<org.apache.camel.spi.AsyncProcessorAwaitManager.AwaitThread>browse()voidcountDown(org.apache.camel.Exchange exchange, CountDownLatch latch)protected voiddoStop()org.apache.camel.spi.AsyncProcessorAwaitManager.StatisticsgetStatistics()voidinterrupt(String exchangeId)voidinterrupt(org.apache.camel.Exchange exchange)booleanisInterruptThreadsWhileStopping()voidprocess(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.voidsetInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping)intsize()-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
process
public 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. This can be used byAsyncProcessorobjects to implement their sync version of the process method. Important: This method is discouraged to be used, as its better to invoke the asynchronousAsyncProcessor.process(org.apache.camel.Exchange, org.apache.camel.AsyncCallback)method, whenever possible.- Specified by:
processin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager- Parameters:
processor- the processorexchange- the exchange
-
await
public void await(org.apache.camel.Exchange exchange, CountDownLatch latch)
-
countDown
public void countDown(org.apache.camel.Exchange exchange, CountDownLatch latch)
-
size
public int size()
- Specified by:
sizein interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
browse
public Collection<org.apache.camel.spi.AsyncProcessorAwaitManager.AwaitThread> browse()
- Specified by:
browsein interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
interrupt
public void interrupt(String exchangeId)
- Specified by:
interruptin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
interrupt
public void interrupt(org.apache.camel.Exchange exchange)
- Specified by:
interruptin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
isInterruptThreadsWhileStopping
public boolean isInterruptThreadsWhileStopping()
- Specified by:
isInterruptThreadsWhileStoppingin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
setInterruptThreadsWhileStopping
public void setInterruptThreadsWhileStopping(boolean interruptThreadsWhileStopping)
- Specified by:
setInterruptThreadsWhileStoppingin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
getStatistics
public org.apache.camel.spi.AsyncProcessorAwaitManager.Statistics getStatistics()
- Specified by:
getStatisticsin interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
-