@UriEndpoint(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) |
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
|
DirectConsumer |
getConsumer() |
protected String |
getKey() |
long |
getTimeout() |
boolean |
hasConsumer(DirectConsumer consumer) |
boolean |
isBlock() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
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 |
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, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, 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 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 boolean hasConsumer(DirectConsumer consumer)
public DirectConsumer getConsumer()
public boolean isBlock()
public void setBlock(boolean block)
public long getTimeout()
public void setTimeout(long timeout)
timeout - the timeout valueprotected String getKey()
Apache Camel