@UriEndpoint(firstVersion="1.0.0",
scheme="direct",
title="Direct",
syntax="direct:name",
category={CORE,ENDPOINT})
public class DirectEndpoint
extends org.apache.camel.support.DefaultEndpoint
| Constructor and Description |
|---|
DirectEndpoint() |
DirectEndpoint(String endpointUri,
org.apache.camel.Component component) |
DirectEndpoint(String uri,
org.apache.camel.Component component,
Map<String,DirectConsumer> consumers) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(DirectConsumer consumer) |
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer() |
protected DirectConsumer |
getConsumer() |
protected String |
getKey() |
long |
getTimeout() |
boolean |
isBlock() |
boolean |
isFailIfNoConsumers() |
void |
removeConsumer(DirectConsumer consumer) |
void |
setBlock(boolean block)
If sending a message to a direct endpoint which has no active consumer, then we can tell the producer to block
and wait for the consumer to become active.
|
void |
setFailIfNoConsumers(boolean failIfNoConsumers)
Whether the producer should fail by throwing an exception, when sending to a DIRECT endpoint with no active
consumers.
|
void |
setTimeout(long timeout)
The timeout value to use if block is enabled.
|
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringbuild, doBuild, doFail, 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, finalize, getClass, notify, notifyAll, wait, wait, waitpublic DirectEndpoint()
public DirectEndpoint(String endpointUri, org.apache.camel.Component component)
public DirectEndpoint(String uri, org.apache.camel.Component component, Map<String,DirectConsumer> consumers)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
Exceptionpublic void addConsumer(DirectConsumer consumer)
public void removeConsumer(DirectConsumer consumer)
protected DirectConsumer getConsumer() throws InterruptedException
InterruptedExceptionpublic boolean isBlock()
public void setBlock(boolean block)
public long getTimeout()
public void setTimeout(long timeout)
timeout - the timeout valuepublic boolean isFailIfNoConsumers()
public void setFailIfNoConsumers(boolean failIfNoConsumers)
protected String getKey()
Apache Camel