@Component(value="direct")
public class DirectComponent
extends org.apache.camel.support.DefaultComponent
DirectEndpoint and holds the
list of named direct endpoints.| Constructor and Description |
|---|
DirectComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(String key,
DirectConsumer consumer) |
protected org.apache.camel.Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters) |
protected void |
doShutdown() |
protected DirectConsumer |
getConsumer(String key,
boolean block,
long timeout) |
long |
getTimeout() |
boolean |
isBlock() |
void |
removeConsumer(String key,
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.
|
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, doStart, doStop, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIbuild, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
createEndpoint in class org.apache.camel.support.DefaultComponentExceptionprotected void doShutdown()
throws Exception
doShutdown in class org.apache.camel.support.service.BaseServiceExceptionpublic boolean isBlock()
public void setBlock(boolean block)
public long getTimeout()
public void setTimeout(long timeout)
public void addConsumer(String key, DirectConsumer consumer)
public void removeConsumer(String key, DirectConsumer consumer)
protected DirectConsumer getConsumer(String key, boolean block, long timeout) throws InterruptedException
InterruptedExceptionApache Camel