public class SendDynamicProcessor extends ServiceSupport implements AsyncProcessor, IdAware, CamelContextAware
SendProcessor| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowOptimisedComponents |
protected int |
cacheSize |
protected CamelContext |
camelContext |
protected SendDynamicAware |
dynamicAware |
protected Expression |
expression |
protected String |
id |
protected boolean |
ignoreInvalidEndpoint |
protected static org.slf4j.Logger |
LOG |
protected ExchangePattern |
pattern |
protected ProducerCache |
producerCache |
protected String |
uri |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
SendDynamicProcessor(Expression expression) |
SendDynamicProcessor(String uri,
Expression expression) |
| Modifier and Type | Method and Description |
|---|---|
protected Exchange |
configureExchange(Exchange exchange,
ExchangePattern pattern,
ExchangePattern destinationExchangePattern,
Endpoint endpoint) |
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
int |
getCacheSize() |
CamelContext |
getCamelContext()
Get the
CamelContext |
SendDynamicAware |
getDynamicAware() |
EndpointUtilizationStatistics |
getEndpointUtilizationStatistics() |
Expression |
getExpression() |
String |
getId()
Returns the id
|
ExchangePattern |
getPattern() |
String |
getUri() |
boolean |
isAllowOptimisedComponents() |
boolean |
isIgnoreInvalidEndpoint() |
void |
process(Exchange exchange)
Processes the message exchange
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange.
|
protected static Endpoint |
resolveEndpoint(Exchange exchange,
Object recipient) |
protected static String |
resolveScheme(Exchange exchange,
String uri) |
protected static String |
resolveUri(Exchange exchange,
Object recipient) |
void |
setAllowOptimisedComponents(boolean allowOptimisedComponents) |
void |
setCacheSize(int cacheSize) |
void |
setCamelContext(CamelContext camelContext)
Injects the
CamelContext |
void |
setId(String id)
Sets the id
|
void |
setIgnoreInvalidEndpoint(boolean ignoreInvalidEndpoint) |
void |
setPattern(ExchangePattern pattern) |
String |
toString() |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendprotected static final org.slf4j.Logger LOG
protected SendDynamicAware dynamicAware
protected CamelContext camelContext
protected final Expression expression
protected ExchangePattern pattern
protected ProducerCache producerCache
protected boolean ignoreInvalidEndpoint
protected int cacheSize
protected boolean allowOptimisedComponents
public SendDynamicProcessor(Expression expression)
public SendDynamicProcessor(String uri, Expression expression)
public void process(Exchange exchange) throws Exception
Processorpublic 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.protected static String resolveUri(Exchange exchange, Object recipient) throws NoTypeConversionAvailableException
protected static String resolveScheme(Exchange exchange, String uri)
protected static Endpoint resolveEndpoint(Exchange exchange, Object recipient) throws NoTypeConversionAvailableException
protected Exchange configureExchange(Exchange exchange, ExchangePattern pattern, ExchangePattern destinationExchangePattern, Endpoint endpoint)
protected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class ServiceSupportExceptionServiceSupport.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 ServiceSupportExceptionServiceSupport.doStart()public EndpointUtilizationStatistics getEndpointUtilizationStatistics()
public CamelContext getCamelContext()
CamelContextAwareCamelContextgetCamelContext in interface CamelContextAwarepublic void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContextsetCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic SendDynamicAware getDynamicAware()
public Expression getExpression()
public ExchangePattern getPattern()
public void setPattern(ExchangePattern pattern)
public boolean isIgnoreInvalidEndpoint()
public void setIgnoreInvalidEndpoint(boolean ignoreInvalidEndpoint)
public int getCacheSize()
public void setCacheSize(int cacheSize)
public boolean isAllowOptimisedComponents()
public void setAllowOptimisedComponents(boolean allowOptimisedComponents)
Apache Camel