public class InterceptSendToEndpointProcessor extends DefaultAsyncProducer
Processor
used to interceptor and detour the routing
when using the InterceptSendToEndpoint
functionality.log
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
InterceptSendToEndpointProcessor(InterceptSendToEndpoint endpoint,
Endpoint delegate,
Producer producer,
boolean skip) |
Modifier and Type | Method and Description |
---|---|
Exchange |
createExchange()
Creates a new exchange to send to this endpoint
|
Exchange |
createExchange(Exchange exchange)
Deprecated.
|
Exchange |
createExchange(ExchangePattern pattern)
Creates a new exchange of the given pattern to send to this endpoint
|
Endpoint |
getEndpoint()
Gets the endpoint associated with an object.
|
boolean |
isSingleton()
This implementation will delegate to the endpoint
IsSingleton.isSingleton() |
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange.
|
void |
start()
Starts the service
|
void |
stop()
Stops the service
|
process
doStart, doStop, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, suspend
public InterceptSendToEndpointProcessor(InterceptSendToEndpoint endpoint, Endpoint delegate, Producer producer, boolean skip) throws Exception
Exception
public Endpoint getEndpoint()
EndpointAware
Producer
or for consuming from for components like Consumer
or Route
getEndpoint
in interface EndpointAware
getEndpoint
in class DefaultProducer
public Exchange createExchange()
Producer
createExchange
in interface Producer
createExchange
in class DefaultProducer
public Exchange createExchange(ExchangePattern pattern)
Producer
createExchange
in interface Producer
createExchange
in class DefaultProducer
pattern
- the exchange pattern@Deprecated public Exchange createExchange(Exchange exchange)
Producer
createExchange
in interface Producer
createExchange
in class DefaultProducer
exchange
- the existing exchangepublic boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception
would be set on the Exchange
.exchange
- the message exchangecallback
- the AsyncCallback
will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.public boolean isSingleton()
DefaultProducer
IsSingleton.isSingleton()
isSingleton
in interface IsSingleton
isSingleton
in class DefaultProducer
public void start() throws Exception
Service
start
in interface Service
start
in class ServiceSupport
Exception
- is thrown if starting failedApache Camel