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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.camel.spi.AsyncProcessorAwaitManager
org.apache.camel.spi.AsyncProcessorAwaitManager.AwaitThread, org.apache.camel.spi.AsyncProcessorAwaitManager.Statistics -
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidawait(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.Statisticsvoidvoidinterrupt(org.apache.camel.Exchange exchange) booleanvoidprocess(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, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
DefaultAsyncProcessorAwaitManager
public DefaultAsyncProcessorAwaitManager()
-
-
Method Details
-
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
-
countDown
-
size
public int size()- Specified by:
sizein interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
browse
- Specified by:
browsein interfaceorg.apache.camel.spi.AsyncProcessorAwaitManager
-
interrupt
- 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
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-