public class RoutingSlip
extends org.apache.camel.support.AsyncProcessorSupport
implements org.apache.camel.Traceable, org.apache.camel.spi.IdAware
Pipeline
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.Modifier and Type | Class and Description |
---|---|
protected static interface |
RoutingSlip.RoutingSlipIterator
The iterator to be used for retrieving the next routing slip(s) to be used.
|
Modifier and Type | Field and Description |
---|---|
protected int |
cacheSize |
protected org.apache.camel.CamelContext |
camelContext |
protected org.apache.camel.AsyncProcessor |
errorHandler |
protected org.apache.camel.Expression |
expression |
protected String |
header |
protected String |
id |
protected boolean |
ignoreInvalidEndpoints |
protected org.apache.camel.spi.ProducerCache |
producerCache |
protected String |
uriDelimiter |
Constructor and Description |
---|
RoutingSlip(org.apache.camel.CamelContext camelContext) |
RoutingSlip(org.apache.camel.CamelContext camelContext,
org.apache.camel.Expression expression,
String uriDelimiter) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.camel.AsyncProcessor |
createErrorHandler(org.apache.camel.spi.RouteContext routeContext,
org.apache.camel.Exchange exchange,
org.apache.camel.AsyncProcessor processor,
org.apache.camel.Endpoint endpoint) |
protected RoutingSlip.RoutingSlipIterator |
createRoutingSlipIterator(org.apache.camel.Exchange exchange,
org.apache.camel.Expression expression)
Creates the route slip iterator to be used.
|
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
int |
getCacheSize() |
org.apache.camel.spi.EndpointUtilizationStatistics |
getEndpointUtilizationStatistics() |
org.apache.camel.AsyncProcessor |
getErrorHandler() |
org.apache.camel.Expression |
getExpression() |
String |
getId() |
String |
getTraceLabel() |
String |
getUriDelimiter() |
boolean |
isIgnoreInvalidEndpoints() |
org.apache.camel.AsyncProcessor |
newRoutingSlipProcessorForErrorHandler()
Creates the embedded processor to use when wrapping this routing slip in an error handler.
|
protected org.apache.camel.Exchange |
prepareExchangeForRoutingSlip(org.apache.camel.Exchange current,
org.apache.camel.Endpoint endpoint) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
protected boolean |
processExchange(org.apache.camel.Endpoint endpoint,
org.apache.camel.Exchange exchange,
org.apache.camel.Exchange original,
org.apache.camel.AsyncCallback originalCallback,
RoutingSlip.RoutingSlipIterator iter) |
protected org.apache.camel.Endpoint |
resolveEndpoint(RoutingSlip.RoutingSlipIterator iter,
org.apache.camel.Exchange exchange) |
void |
setCacheSize(int cacheSize) |
void |
setDelimiter(String delimiter) |
void |
setErrorHandler(org.apache.camel.AsyncProcessor errorHandler) |
void |
setId(String id) |
void |
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints) |
String |
toString() |
doInit, doResume, doSuspend, getStatus, init, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
protected String id
protected org.apache.camel.spi.ProducerCache producerCache
protected int cacheSize
protected boolean ignoreInvalidEndpoints
protected String header
protected org.apache.camel.Expression expression
protected String uriDelimiter
protected final org.apache.camel.CamelContext camelContext
protected org.apache.camel.AsyncProcessor errorHandler
public RoutingSlip(org.apache.camel.CamelContext camelContext)
public RoutingSlip(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression, String uriDelimiter)
public String getId()
getId
in interface org.apache.camel.spi.HasId
public void setId(String id)
setId
in interface org.apache.camel.spi.IdAware
public org.apache.camel.Expression getExpression()
public String getUriDelimiter()
public void setDelimiter(String delimiter)
public boolean isIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
public int getCacheSize()
public void setCacheSize(int cacheSize)
public org.apache.camel.AsyncProcessor getErrorHandler()
public void setErrorHandler(org.apache.camel.AsyncProcessor errorHandler)
public String getTraceLabel()
getTraceLabel
in interface org.apache.camel.Traceable
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
process
in interface org.apache.camel.AsyncProcessor
protected RoutingSlip.RoutingSlipIterator createRoutingSlipIterator(org.apache.camel.Exchange exchange, org.apache.camel.Expression expression) throws Exception
exchange
- the exchangeexpression
- the expressionException
protected org.apache.camel.Endpoint resolveEndpoint(RoutingSlip.RoutingSlipIterator iter, org.apache.camel.Exchange exchange) throws Exception
Exception
protected org.apache.camel.Exchange prepareExchangeForRoutingSlip(org.apache.camel.Exchange current, org.apache.camel.Endpoint endpoint)
protected org.apache.camel.AsyncProcessor createErrorHandler(org.apache.camel.spi.RouteContext routeContext, org.apache.camel.Exchange exchange, org.apache.camel.AsyncProcessor processor, org.apache.camel.Endpoint endpoint)
protected boolean processExchange(org.apache.camel.Endpoint endpoint, org.apache.camel.Exchange exchange, org.apache.camel.Exchange original, org.apache.camel.AsyncCallback originalCallback, RoutingSlip.RoutingSlipIterator iter)
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.AsyncProcessorSupport
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.AsyncProcessorSupport
Exception
protected void doShutdown() throws Exception
doShutdown
in class org.apache.camel.support.service.ServiceSupport
Exception
public org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
public org.apache.camel.AsyncProcessor newRoutingSlipProcessorForErrorHandler()
Apache Camel