@UriEndpoint(scheme="direct-vm", title="Direct VM", syntax="direct-vm:name", consumerClass=DirectConsumer.class, label="core,endpoint") public class DirectVmEndpoint extends DefaultEndpoint
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
DirectVmEndpoint(String endpointUri,
DirectVmComponent component) |
Modifier and Type | Method and Description |
---|---|
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
|
DirectVmComponent |
getComponent()
Returns the component that created this endpoint.
|
DirectVmConsumer |
getConsumer() |
long |
getTimeout() |
boolean |
isBlock() |
boolean |
isFailIfNoConsumers() |
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
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-VM 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, 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, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public DirectVmEndpoint(String endpointUri, DirectVmComponent component)
public DirectVmComponent getComponent()
DefaultEndpoint
getComponent
in class DefaultEndpoint
public Producer createProducer() throws Exception
Endpoint
Exception
- can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpoint
processor
- the given processorException
- can be thrownpublic boolean isSingleton()
IsSingleton
public DirectVmConsumer getConsumer()
public boolean isBlock()
public void setBlock(boolean block)
public long getTimeout()
public void setTimeout(long timeout)
public boolean isFailIfNoConsumers()
public void setFailIfNoConsumers(boolean failIfNoConsumers)
Apache Camel