@UriEndpoint(firstVersion="1.0.0",
scheme="direct",
title="Direct",
syntax="direct:name",
consumerClass=DirectConsumer.class,
label="core,endpoint")
public class DirectEndpoint
extends DefaultEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
DirectEndpoint() |
DirectEndpoint(String endpointUri,
Component component) |
DirectEndpoint(String uri,
Component component,
Map<String,DirectConsumer> consumers) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(DirectConsumer consumer) |
void |
addProducer(DirectProducer producer) |
Consumer |
createConsumer(Processor processor)
Creates a new Event
Driven Consumer which consumes messages from the endpoint using the
given processor
|
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
protected DirectConsumer |
getConsumer() |
protected String |
getKey() |
long |
getTimeout() |
boolean |
isBlock() |
boolean |
isFailIfNoConsumers() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
void |
removeConsumer(DirectConsumer consumer) |
void |
removeProducer(DirectProducer producer) |
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, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toStringdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic DirectEndpoint()
public DirectEndpoint(String endpointUri, Component component)
public DirectEndpoint(String uri, Component component, Map<String,DirectConsumer> consumers)
public Producer createProducer() throws Exception
EndpointException - can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpointprocessor - the given processorException - can be thrownpublic boolean isSingleton()
IsSingletonpublic void addConsumer(DirectConsumer consumer)
public void removeConsumer(DirectConsumer consumer)
public void addProducer(DirectProducer producer)
public void removeProducer(DirectProducer producer)
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)
Apache Camel