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, toStringdoInit, doResume, doShutdown, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic 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