public class DirectVmComponent extends UriEndpointComponent
DirectVmEndpoint and holds the list of named direct-vm endpoints.shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
DirectVmComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConsumer(DirectVmEndpoint endpoint,
DirectVmConsumer consumer) |
protected Endpoint |
createEndpoint(String uri,
String remaining,
Map<String,Object> parameters)
A factory method allowing derived components to create a new endpoint
from the given URI, remaining path and optional parameters
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
DirectVmConsumer |
getConsumer(DirectVmEndpoint endpoint) |
static Collection<Endpoint> |
getConsumerEndpoints()
Gets all the consumer endpoints.
|
long |
getTimeout() |
boolean |
isBlock() |
void |
removeConsumer(DirectVmEndpoint endpoint,
DirectVmConsumer 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.
|
createComponentConfiguration, createParameterConfigurationMap, getEndpointClass, getParameterConfigurationMap, populateParameterConfigurationMap, setEndpointClassafterConfiguration, createConfiguration, createEndpoint, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, ifStartsWithReturnRemainder, preProcessUri, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, setCamelContext, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIdoResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic static Collection<Endpoint> getConsumerEndpoints()
protected Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
DefaultComponentcreateEndpoint in class DefaultComponenturi - the full URI of the endpointremaining - the remaining part of the URI without the query
parameters or component prefixparameters - the optional parameters passed inException - is thrown if error creating the endpointpublic DirectVmConsumer getConsumer(DirectVmEndpoint endpoint)
public void addConsumer(DirectVmEndpoint endpoint, DirectVmConsumer consumer)
public void removeConsumer(DirectVmEndpoint endpoint, DirectVmConsumer consumer)
protected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class DefaultComponentExceptionServiceSupport.doStop()protected void doStop()
throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.doStop in class DefaultComponentExceptionServiceSupport.doStart()public boolean isBlock()
public void setBlock(boolean block)
public long getTimeout()
public void setTimeout(long timeout)
Apache Camel