public class DirectVmBlockingProducer
extends org.apache.camel.support.DefaultAsyncProducer
DirectEndpoint#isBlock) then the DirectEndpoint will create an instance of this class
instead of DirectProducer. This producers process method will block for the configured duration
(DirectEndpoint#getTimeout, default to 30 seconds). After which if a consumer is still unavailable a
DirectConsumerNotAvailableException will be thrown.
Implementation note: Concurrent Producers will block for the duration it takes to determine if a consumer is
available, but actual consumer execution will happen concurrently.| Constructor and Description |
|---|
DirectVmBlockingProducer(DirectVmEndpoint endpoint) |
| Modifier and Type | Method and Description |
|---|---|
protected DirectVmConsumer |
getConsumer(org.apache.camel.Exchange exchange) |
void |
process(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
createExchange, doStart, doStop, getEndpoint, isSingleton, toStringbuild, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic DirectVmBlockingProducer(DirectVmEndpoint endpoint)
public void process(org.apache.camel.Exchange exchange)
throws Exception
process in interface org.apache.camel.Processorprocess in class org.apache.camel.support.DefaultAsyncProducerExceptionpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
protected DirectVmConsumer getConsumer(org.apache.camel.Exchange exchange) throws Exception
ExceptionApache Camel