|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.processor.RoutingSlip
public class RoutingSlip
Implements a Routing Slip pattern where the list of actual endpoints to send a message exchange to are dependent on the value of a message header.
This implementation mirrors the logic from thePipeline in the async variation
as the failover load balancer is a specialized pipeline. So the trick is to keep doing the same as the
pipeline to ensure it works the same and the async routing engine is flawless.
| Constructor Summary | |
|---|---|
RoutingSlip(CamelContext camelContext)
|
|
RoutingSlip(CamelContext camelContext,
Expression expression,
String uriDelimiter)
|
|
RoutingSlip(CamelContext camelContext,
String header)
Deprecated. |
|
RoutingSlip(CamelContext camelContext,
String header,
String uriDelimiter)
Deprecated. |
|
| Method Summary | |
|---|---|
boolean |
doRoutingSlip(Exchange exchange,
Object routingSlip,
AsyncCallback callback)
|
protected void |
doStart()
|
protected void |
doStop()
|
String |
getTraceLabel()
Gets the trace label used for logging when tracing is enabled. |
boolean |
isIgnoreInvalidEndpoints()
|
protected Exchange |
prepareExchangeForRoutingSlip(Exchange current)
|
void |
process(Exchange exchange)
Processes the message exchange |
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange. |
protected boolean |
processExchange(Endpoint endpoint,
Exchange exchange,
Exchange original,
AsyncCallback callback,
Iterator<Object> iter)
|
protected Endpoint |
resolveEndpoint(Iterator<Object> iter,
Exchange exchange)
|
void |
setDelimiter(String delimiter)
|
void |
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
|
String |
toString()
|
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RoutingSlip(CamelContext camelContext)
@Deprecated
public RoutingSlip(CamelContext camelContext,
String header)
@Deprecated
public RoutingSlip(CamelContext camelContext,
String header,
String uriDelimiter)
public RoutingSlip(CamelContext camelContext,
Expression expression,
String uriDelimiter)
| Method Detail |
|---|
public void setDelimiter(String delimiter)
public boolean isIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
public String toString()
toString in class Objectpublic String getTraceLabel()
Traceable
getTraceLabel in interface Traceable
public void process(Exchange exchange)
throws Exception
Processor
process in interface Processorexchange - the message exchange
Exception - if an internal processing error has occurred.
public boolean process(Exchange exchange,
AsyncCallback callback)
AsyncProcessorProcessor.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.
process in interface AsyncProcessorexchange - 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.
org.apache.camel.util.AsyncProcessorHelper#process(AsyncProcessor, Exchange, AsyncCallback)}
public boolean doRoutingSlip(Exchange exchange,
Object routingSlip,
AsyncCallback callback)
protected Endpoint resolveEndpoint(Iterator<Object> iter,
Exchange exchange)
throws Exception
Exceptionprotected Exchange prepareExchangeForRoutingSlip(Exchange current)
protected boolean processExchange(Endpoint endpoint,
Exchange exchange,
Exchange original,
AsyncCallback callback,
Iterator<Object> iter)
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||