public class DefaultProducerTemplate extends ServiceSupport implements ProducerTemplate
Message
instances in an
Exchange
to an Endpoint
.shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
DefaultProducerTemplate(CamelContext camelContext) |
DefaultProducerTemplate(CamelContext camelContext,
Endpoint defaultEndpoint) |
DefaultProducerTemplate(CamelContext camelContext,
ExecutorService executor) |
Modifier and Type | Method and Description |
---|---|
protected CompletableFuture<Object> |
asyncCallback(Endpoint endpoint,
ExchangePattern pattern,
Object body,
Synchronization onCompletion) |
CompletableFuture<Exchange> |
asyncCallback(Endpoint endpoint,
Exchange exchange,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint.
|
CompletableFuture<Exchange> |
asyncCallback(Endpoint endpoint,
Processor processor,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint using a supplied processor.
|
CompletableFuture<Exchange> |
asyncCallback(String uri,
Exchange exchange,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint.
|
CompletableFuture<Exchange> |
asyncCallback(String uri,
Processor processor,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint using a supplied processor.
|
CompletableFuture<Object> |
asyncCallbackRequestBody(Endpoint endpoint,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncCallbackRequestBody(String uri,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncCallbackSendBody(Endpoint endpoint,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncCallbackSendBody(String uri,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint.
|
protected CompletableFuture<Exchange> |
asyncRequest(Endpoint endpoint,
Processor processor,
Processor resultProcessor) |
CompletableFuture<Object> |
asyncRequestBody(Endpoint endpoint,
Object body)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBody(Endpoint endpoint,
Object body,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
protected CompletableFuture<Object> |
asyncRequestBody(Endpoint endpoint,
Processor processor) |
protected <T> CompletableFuture<T> |
asyncRequestBody(Endpoint endpoint,
Processor processor,
Class<T> type) |
protected CompletableFuture<Object> |
asyncRequestBody(Endpoint endpoint,
Processor processor,
Processor resultProcessor) |
CompletableFuture<Object> |
asyncRequestBody(String uri,
Object body)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBody(String uri,
Object body,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncRequestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncRequestBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncRequestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncRequestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
Sends an asynchronous body to the given endpoint.
|
<T> CompletableFuture<T> |
asyncRequestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Exchange> |
asyncSend(Endpoint endpoint,
Exchange exchange)
Sends an asynchronous exchange to the given endpoint.
|
protected CompletableFuture<Exchange> |
asyncSend(Endpoint endpoint,
ExchangePattern pattern,
Processor processor,
Processor resultProcessor) |
CompletableFuture<Exchange> |
asyncSend(Endpoint endpoint,
Processor processor)
Sends an asynchronous exchange to the given endpoint.
|
CompletableFuture<Exchange> |
asyncSend(String uri,
Exchange exchange)
Sends an asynchronous exchange to the given endpoint.
|
CompletableFuture<Exchange> |
asyncSend(String uri,
Processor processor)
Sends an asynchronous exchange to the given endpoint.
|
CompletableFuture<Object> |
asyncSendBody(Endpoint endpoint,
Object body)
Sends an asynchronous body to the given endpoint.
|
CompletableFuture<Object> |
asyncSendBody(String uri,
Object body)
Sends an asynchronous body to the given endpoint.
|
protected CompletableFuture<Exchange> |
asyncSendExchange(Endpoint endpoint,
ExchangePattern pattern,
Processor processor,
Processor resultProcessor,
Exchange inExchange) |
void |
cleanUp()
Cleanup the cache (purging stale entries)
|
protected Processor |
createBodyAndHeaderProcessor(Object body,
String header,
Object headerValue) |
protected Processor |
createBodyAndHeaders(Object body,
Map<String,Object> headers) |
protected Processor |
createBodyAndPropertyProcessor(Object body,
String property,
Object propertyValue) |
protected Function<Exchange,Exchange> |
createCompletionFunction(Synchronization onCompletion) |
protected Processor |
createConvertBodyProcessor(Class<?> type) |
protected Processor |
createSetBodyProcessor(Object body) |
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
<T> T |
extractFutureBody(Future<?> future,
Class<T> type)
Gets the response body from the future handle, will wait until the response is ready.
|
<T> T |
extractFutureBody(Future<?> future,
long timeout,
TimeUnit unit,
Class<T> type)
Gets the response body from the future handle, will wait at most the given time for the response to be ready.
|
protected Object |
extractResultBody(Exchange result) |
protected Object |
extractResultBody(Exchange result,
ExchangePattern pattern) |
CamelContext |
getCamelContext()
Get the
CamelContext |
CamelContext |
getContext()
Deprecated.
|
int |
getCurrentCacheSize()
Gets an approximated size of the current cached resources in the backing cache pools.
|
Endpoint |
getDefaultEndpoint()
Get the default endpoint to use if none is specified
|
protected Endpoint |
getMandatoryDefaultEndpoint() |
int |
getMaximumCacheSize()
Gets the maximum cache size used in the backing cache pools.
|
<T extends Endpoint> |
getResolvedEndpoint(String endpointUri,
Class<T> expectedClass)
Deprecated.
|
boolean |
isEventNotifierEnabled()
Whether the
EventNotifier should be
used by this ProducerTemplate to send events about the Exchange
being sent. |
boolean |
isThreadedAsyncMode()
Reports if async* methods will dispath processing from the calling thread (false) or through executor (true).
|
static DefaultProducerTemplate |
newInstance(CamelContext camelContext,
String defaultEndpointUri) |
Exchange |
request(Endpoint endpoint,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Uses an
ExchangePattern.InOut message exchange pattern. |
Exchange |
request(String endpoint,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Uses an
ExchangePattern.InOut message exchange pattern. |
Object |
requestBody(Endpoint endpoint,
Object body)
Send the body to an endpoint returning any result output body.
|
<T> T |
requestBody(Endpoint endpoint,
Object body,
Class<T> type)
Send the body to an endpoint returning any result output body.
|
Object |
requestBody(Object body)
Sends the body to the default endpoint and returns the result content
Uses an
ExchangePattern.InOut message exchange pattern. |
<T> T |
requestBody(Object body,
Class<T> type)
Sends the body to the default endpoint and returns the result content
Uses an
ExchangePattern.InOut message exchange pattern. |
Object |
requestBody(String endpoint,
Object body)
Send the body to an endpoint returning any result output body.
|
<T> T |
requestBody(String endpointUri,
Object body,
Class<T> type)
Send the body to an endpoint returning any result output body.
|
Object |
requestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue)
Send the body to an endpoint returning any result output body.
|
<T> T |
requestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue,
Class<T> type)
Send the body to an endpoint returning any result output body.
|
Object |
requestBodyAndHeader(Object body,
String header,
Object headerValue)
Sends the body to the default endpoint and returns the result content
Uses an
ExchangePattern.InOut message exchange pattern. |
Object |
requestBodyAndHeader(String endpoint,
Object body,
String header,
Object headerValue)
Send the body to an endpoint returning any result output body.
|
<T> T |
requestBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue,
Class<T> type)
Send the body to an endpoint returning any result output body.
|
Object |
requestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values.
|
<T> T |
requestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends the body to an endpoint with the specified headers and header values.
|
Object |
requestBodyAndHeaders(Object body,
Map<String,Object> headers)
Sends the body to the default endpoint and returns the result content
Uses an
ExchangePattern.InOut message exchange pattern. |
Object |
requestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values.
|
<T> T |
requestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends the body to an endpoint with the specified headers and header values.
|
protected Endpoint |
resolveMandatoryEndpoint(String endpointUri) |
Exchange |
send(Endpoint endpoint,
Exchange exchange)
Sends the exchange to the given endpoint
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(Endpoint endpoint,
ExchangePattern pattern,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(Endpoint endpoint,
ExchangePattern pattern,
Processor processor,
Processor resultProcessor)
Sends an exchange to an endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(Endpoint endpoint,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(Exchange exchange)
Sends the exchange to the default endpoint
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(Processor processor)
Sends an exchange to the default endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(String endpointUri,
Exchange exchange)
Sends the exchange to the given endpoint
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(String endpointUri,
ExchangePattern pattern,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Exchange |
send(String endpointUri,
Processor processor)
Sends an exchange to an endpoint using a supplied processor
Notice: that if the processing of the exchange failed with an Exception it is not thrown from this method, but you can access it from the returned exchange using Exchange.getException() . |
Object |
sendBody(Endpoint endpoint,
ExchangePattern pattern,
Object body)
Send the body to an endpoint with the given
ExchangePattern
returning any result output body
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBody(Endpoint endpoint,
Object body)
Send the body to an endpoint
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBody(Object body)
Sends the body to the default endpoint
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBody(String endpointUri,
ExchangePattern pattern,
Object body)
Send the body to an endpoint returning any result output body
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBody(String endpointUri,
Object body)
Send the body to an endpoint
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndHeader(Endpoint endpoint,
ExchangePattern pattern,
Object body,
String header,
Object headerValue)
Sends the body to an endpoint with a specified header and header value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue)
Sends the body to an endpoint with a specified header and header value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeader(Object body,
String header,
Object headerValue)
Sends the body to the default endpoint with a specified header and header value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndHeader(String endpoint,
ExchangePattern pattern,
Object body,
String header,
Object headerValue)
Sends the body to an endpoint with a specified header and header value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue)
Sends the body to an endpoint with a specified header and header value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndHeaders(Endpoint endpoint,
ExchangePattern pattern,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeaders(Object body,
Map<String,Object> headers)
Sends the body to the default endpoint with the specified headers and header values
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndHeaders(String endpointUri,
ExchangePattern pattern,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndProperty(Endpoint endpoint,
ExchangePattern pattern,
Object body,
String property,
Object propertyValue)
Sends the body to an endpoint with a specified property and property value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndProperty(Endpoint endpoint,
Object body,
String property,
Object propertyValue)
Sends the body to an endpoint with a specified property and property value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndProperty(Object body,
String property,
Object propertyValue)
Sends the body to the default endpoint with a specified property and property value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
Object |
sendBodyAndProperty(String endpoint,
ExchangePattern pattern,
Object body,
String property,
Object propertyValue)
Sends the body to an endpoint with a specified property and property value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
sendBodyAndProperty(String endpointUri,
Object body,
String property,
Object propertyValue)
Sends the body to an endpoint with a specified property and property value
Notice: that if the processing of the exchange failed with an Exception it is thrown from this method as a CamelExecutionException with
the caused exception wrapped. |
void |
setDefaultEndpoint(Endpoint defaultEndpoint)
Sets the default endpoint to use if none is specified
|
void |
setDefaultEndpointUri(String endpointUri)
Sets the default endpoint to use if none is specified
|
void |
setEventNotifierEnabled(boolean eventNotifierEnabled)
Sets whether the
EventNotifier should be
used by this ProducerTemplate to send events about the Exchange
being sent. |
void |
setExecutorService(ExecutorService executorService)
Sets a custom executor service to use for async messaging.
|
void |
setMaximumCacheSize(int maximumCacheSize)
Sets a custom maximum cache size to use in the backing cache pools.
|
void |
setThreadedAsyncMode(boolean useExecutor)
Reports if async* methods will dispath processing from the calling thread (false) or through executor (true).
|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public DefaultProducerTemplate(CamelContext camelContext)
public DefaultProducerTemplate(CamelContext camelContext, ExecutorService executor)
public DefaultProducerTemplate(CamelContext camelContext, Endpoint defaultEndpoint)
public static DefaultProducerTemplate newInstance(CamelContext camelContext, String defaultEndpointUri)
public int getMaximumCacheSize()
ProducerTemplate
getMaximumCacheSize
in interface ProducerTemplate
public void setMaximumCacheSize(int maximumCacheSize)
ProducerTemplate
setMaximumCacheSize
in interface ProducerTemplate
maximumCacheSize
- the custom maximum cache sizepublic boolean isThreadedAsyncMode()
ProducerTemplate
isThreadedAsyncMode
in interface ProducerTemplate
public void setThreadedAsyncMode(boolean useExecutor)
ProducerTemplate
setThreadedAsyncMode
in interface ProducerTemplate
useExecutor
- if async* methods will dipatch processing with the executorpublic int getCurrentCacheSize()
ProducerTemplate
getCurrentCacheSize
in interface ProducerTemplate
public boolean isEventNotifierEnabled()
ProducerTemplate
EventNotifier
should be
used by this ProducerTemplate
to send events about the Exchange
being sent.isEventNotifierEnabled
in interface ProducerTemplate
public void cleanUp()
ProducerTemplate
cleanUp
in interface ProducerTemplate
public void setEventNotifierEnabled(boolean eventNotifierEnabled)
ProducerTemplate
EventNotifier
should be
used by this ProducerTemplate
to send events about the Exchange
being sent.
By default this is enabled.setEventNotifierEnabled
in interface ProducerTemplate
eventNotifierEnabled
- true to enable, false to disable.public Exchange send(String endpointUri, Exchange exchange)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange toexchange
- the exchange to sendpublic Exchange send(String endpointUri, Processor processor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchangepublic Exchange send(String endpointUri, ExchangePattern pattern, Processor processor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
processor
- the transformer used to populate the new exchange
Processor
to populate the exchangepublic Exchange send(Endpoint endpoint, Exchange exchange)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toexchange
- the exchange to sendpublic Exchange send(Endpoint endpoint, Processor processor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchangepublic Exchange send(Endpoint endpoint, ExchangePattern pattern, Processor processor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
processor
- the transformer used to populate the new exchange
Processor
to populate the exchangepublic Exchange send(Endpoint endpoint, ExchangePattern pattern, Processor processor, Processor resultProcessor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
processor
- the transformer used to populate the new exchangeresultProcessor
- a processor to process the exchange when the send is complete.
Processor
to populate the exchangepublic Object sendBody(Endpoint endpoint, ExchangePattern pattern, Object body)
ProducerTemplate
ExchangePattern
returning any result output body
CamelExecutionException
with
the caused exception wrapped.sendBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payloadExchangePattern
is OUT capable, otherwise nullpublic void sendBody(Endpoint endpoint, Object body) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the payloadCamelExecutionException
- if the processing of the exchange failedpublic void sendBody(String endpointUri, Object body) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBody
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange tobody
- the payloadCamelExecutionException
- if the processing of the exchange failedpublic Object sendBody(String endpointUri, ExchangePattern pattern, Object body) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBody
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payloadExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeader
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payload to sendheader
- the header nameheaderValue
- the header valueCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeader
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payload to sendheader
- the header nameheaderValue
- the header valueCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndHeader(Endpoint endpoint, ExchangePattern pattern, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeader
in interface ProducerTemplate
endpoint
- the Endpoint to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheader
- the header nameheaderValue
- the header valueExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndHeader(String endpoint, ExchangePattern pattern, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeader
in interface ProducerTemplate
endpoint
- the Endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheader
- the header nameheaderValue
- the header valueExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndProperty(String endpointUri, Object body, String property, Object propertyValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndProperty
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payload to sendproperty
- the property namepropertyValue
- the property valueCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndProperty(Endpoint endpoint, Object body, String property, Object propertyValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndProperty
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payload to sendproperty
- the property namepropertyValue
- the property valueCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndProperty(Endpoint endpoint, ExchangePattern pattern, Object body, String property, Object propertyValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndProperty
in interface ProducerTemplate
endpoint
- the Endpoint to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendproperty
- the property namepropertyValue
- the property valueExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndProperty(String endpoint, ExchangePattern pattern, Object body, String property, Object propertyValue) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndProperty
in interface ProducerTemplate
endpoint
- the Endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendproperty
- the property namepropertyValue
- the property valueExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headersCamelExecutionException
- if the processing of the exchange failedpublic void sendBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headersCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndHeaders(String endpointUri, ExchangePattern pattern, Object body, Map<String,Object> headers) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheaders
- headersExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic Object sendBodyAndHeaders(Endpoint endpoint, ExchangePattern pattern, Object body, Map<String,Object> headers) throws CamelExecutionException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheaders
- headersExchangePattern
is OUT capable, otherwise nullCamelExecutionException
- if the processing of the exchange failedpublic Exchange request(Endpoint endpoint, Processor processor)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
Exchange.getException()
.request
in interface ProducerTemplate
endpoint
- the Endpoint to send toprocessor
- the processor which will populate the exchange before sendingpublic Object requestBody(Object body) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
body
- the payload to sendCamelExecutionException
- if the processing of the exchange failedpublic Object requestBody(Endpoint endpoint, Object body) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payloadCamelExecutionException
- if the processing of the exchange failedpublic Object requestBodyAndHeader(Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeader
in interface ProducerTemplate
body
- the payloadheader
- the header nameheaderValue
- the header valueCamelExecutionException
- if the processing of the exchange failedpublic Object requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeader
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payloadheader
- the header nameheaderValue
- the header valueCamelExecutionException
- if the processing of the exchange failedpublic Exchange request(String endpoint, Processor processor) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
Exchange.getException()
.request
in interface ProducerTemplate
endpoint
- the endpoint URI to send toprocessor
- the processor which will populate the exchange before sendingCamelExecutionException
public Object requestBody(String endpoint, Object body) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
endpoint
- the endpoint URI to send tobody
- the payloadCamelExecutionException
- if the processing of the exchange failedpublic Object requestBodyAndHeader(String endpoint, Object body, String header, Object headerValue) throws CamelExecutionException
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeader
in interface ProducerTemplate
endpoint
- the endpoint URI to send tobody
- the payloadheader
- the header nameheaderValue
- the header valueCamelExecutionException
- if the processing of the exchange failedpublic Object requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headerspublic Object requestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headerspublic Object requestBodyAndHeaders(Object body, Map<String,Object> headers)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeaders
in interface ProducerTemplate
body
- the payload to sendheaders
- headerspublic <T> T requestBody(Object body, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
body
- the payload to sendtype
- the expected response typepublic <T> T requestBody(Endpoint endpoint, Object body, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payloadtype
- the expected response typepublic <T> T requestBody(String endpointUri, Object body, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBody
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payloadtype
- the expected response typepublic <T> T requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeader
in interface ProducerTemplate
endpoint
- the Endpoint to send tobody
- the payloadheader
- the header nameheaderValue
- the header valuetype
- the expected response typepublic <T> T requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeader
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payloadheader
- the header nameheaderValue
- the header valuetype
- the expected response typepublic <T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headerstype
- the expected response typepublic <T> T requestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.requestBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headerstype
- the expected response typepublic void sendBody(Object body)
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBody
in interface ProducerTemplate
body
- the payload to sendpublic Exchange send(Exchange exchange)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
exchange
- the exchange to sendpublic Exchange send(Processor processor)
ProducerTemplate
Exchange.getException()
.send
in interface ProducerTemplate
processor
- the transformer used to populate the new exchange
Processor
to populate the exchangepublic void sendBodyAndHeader(Object body, String header, Object headerValue)
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeader
in interface ProducerTemplate
body
- the payload to sendheader
- the header nameheaderValue
- the header valuepublic void sendBodyAndProperty(Object body, String property, Object propertyValue)
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndProperty
in interface ProducerTemplate
body
- the payload to sendproperty
- the property namepropertyValue
- the property valuepublic void sendBodyAndHeaders(Object body, Map<String,Object> headers)
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.sendBodyAndHeaders
in interface ProducerTemplate
body
- the payload to sendheaders
- the headers@Deprecated public CamelContext getContext()
getCamelContext()
public CamelContext getCamelContext()
ProducerTemplate
CamelContext
getCamelContext
in interface ProducerTemplate
public Endpoint getDefaultEndpoint()
ProducerTemplate
getDefaultEndpoint
in interface ProducerTemplate
public void setDefaultEndpoint(Endpoint defaultEndpoint)
ProducerTemplate
setDefaultEndpoint
in interface ProducerTemplate
defaultEndpoint
- the default endpoint instancepublic void setDefaultEndpointUri(String endpointUri)
setDefaultEndpointUri
in interface ProducerTemplate
endpointUri
- the default endpoint uri@Deprecated public <T extends Endpoint> T getResolvedEndpoint(String endpointUri, Class<T> expectedClass)
CamelContext.getEndpoint(String, Class)
protected Processor createBodyAndHeaderProcessor(Object body, String header, Object headerValue)
protected Processor createBodyAndHeaders(Object body, Map<String,Object> headers)
protected Processor createBodyAndPropertyProcessor(Object body, String property, Object propertyValue)
protected Processor createSetBodyProcessor(Object body)
protected Processor createConvertBodyProcessor(Class<?> type)
protected Function<Exchange,Exchange> createCompletionFunction(Synchronization onCompletion)
protected Endpoint resolveMandatoryEndpoint(String endpointUri)
protected Endpoint getMandatoryDefaultEndpoint()
protected Object extractResultBody(Exchange result)
protected Object extractResultBody(Exchange result, ExchangePattern pattern)
public void setExecutorService(ExecutorService executorService)
ProducerTemplate
setExecutorService
in interface ProducerTemplate
executorService
- the executor service.public CompletableFuture<Exchange> asyncSend(String uri, Exchange exchange)
ProducerTemplate
asyncSend
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange toexchange
- the exchange to sendpublic CompletableFuture<Exchange> asyncSend(String uri, Processor processor)
ProducerTemplate
asyncSend
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchangepublic CompletableFuture<Object> asyncSendBody(String uri, Object body)
ProducerTemplate
ExchangePattern.InOnly
message exchange pattern.asyncSendBody
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange tobody
- the body to sendpublic CompletableFuture<Object> asyncRequestBody(String uri, Object body)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBody
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange tobody
- the body to sendpublic <T> CompletableFuture<T> asyncRequestBody(String uri, Object body, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBody
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange tobody
- the body to sendtype
- the expected response typepublic CompletableFuture<Object> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeader
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valuepublic <T> CompletableFuture<T> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeader
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valuetype
- the expected response typepublic CompletableFuture<Object> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheaders
- headerspublic <T> CompletableFuture<T> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeaders
in interface ProducerTemplate
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheaders
- headerstype
- the expected response typepublic <T> T extractFutureBody(Future<?> future, Class<T> type)
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.extractFutureBody
in interface ProducerTemplate
future
- the handle to get the responsetype
- the expected response typepublic <T> T extractFutureBody(Future<?> future, long timeout, TimeUnit unit, Class<T> type) throws TimeoutException
ProducerTemplate
CamelExecutionException
with
the caused exception wrapped.extractFutureBody
in interface ProducerTemplate
future
- the handle to get the responsetimeout
- the maximum time to waitunit
- the time unit of the timeout argumenttype
- the expected response typeTimeoutException
- if the wait timed outpublic CompletableFuture<Object> asyncCallbackSendBody(String uri, Object body, Synchronization onCompletion)
ProducerTemplate
ExchangePattern.InOnly
message exchange pattern.asyncCallbackSendBody
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Object> asyncCallbackSendBody(Endpoint endpoint, Object body, Synchronization onCompletion)
ProducerTemplate
ExchangePattern.InOnly
message exchange pattern.asyncCallbackSendBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Object> asyncCallbackRequestBody(String uri, Object body, Synchronization onCompletion)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncCallbackRequestBody
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Object> asyncCallbackRequestBody(Endpoint endpoint, Object body, Synchronization onCompletion)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncCallbackRequestBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Exchange> asyncCallback(String uri, Exchange exchange, Synchronization onCompletion)
ProducerTemplate
asyncCallback
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange toexchange
- the exchange to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Exchange> asyncCallback(String uri, Processor processor, Synchronization onCompletion)
ProducerTemplate
asyncCallback
in interface ProducerTemplate
uri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchangeonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Object> asyncRequestBody(Endpoint endpoint, Object body)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendpublic <T> CompletableFuture<T> asyncRequestBody(Endpoint endpoint, Object body, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendtype
- the expected response typepublic CompletableFuture<Object> asyncRequestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeader
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valueprotected <T> CompletableFuture<T> asyncRequestBody(Endpoint endpoint, Processor processor, Class<T> type)
public <T> CompletableFuture<T> asyncRequestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeader
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valuetype
- the expected response typepublic CompletableFuture<Object> asyncRequestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendheaders
- headerspublic <T> CompletableFuture<T> asyncRequestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers, Class<T> type)
ProducerTemplate
ExchangePattern.InOut
message exchange pattern.asyncRequestBodyAndHeaders
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendheaders
- headerstype
- the expected response typepublic CompletableFuture<Exchange> asyncSend(Endpoint endpoint, Exchange exchange)
ProducerTemplate
asyncSend
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toexchange
- the exchange to sendpublic CompletableFuture<Exchange> asyncSend(Endpoint endpoint, Processor processor)
ProducerTemplate
asyncSend
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchangepublic CompletableFuture<Object> asyncSendBody(Endpoint endpoint, Object body)
ProducerTemplate
ExchangePattern.InOnly
message exchange pattern.asyncSendBody
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange tobody
- the body to sendpublic CompletableFuture<Exchange> asyncCallback(Endpoint endpoint, Exchange exchange, Synchronization onCompletion)
ProducerTemplate
asyncCallback
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toexchange
- the exchange to sendonCompletion
- callback invoked when exchange has been completedpublic CompletableFuture<Exchange> asyncCallback(Endpoint endpoint, Processor processor, Synchronization onCompletion)
ProducerTemplate
asyncCallback
in interface ProducerTemplate
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchangeonCompletion
- callback invoked when exchange has been completedprotected CompletableFuture<Object> asyncRequestBody(Endpoint endpoint, Processor processor)
protected CompletableFuture<Object> asyncRequestBody(Endpoint endpoint, Processor processor, Processor resultProcessor)
protected CompletableFuture<Exchange> asyncRequest(Endpoint endpoint, Processor processor, Processor resultProcessor)
protected CompletableFuture<Exchange> asyncSend(Endpoint endpoint, ExchangePattern pattern, Processor processor, Processor resultProcessor)
protected CompletableFuture<Exchange> asyncSendExchange(Endpoint endpoint, ExchangePattern pattern, Processor processor, Processor resultProcessor, Exchange inExchange)
protected CompletableFuture<Object> asyncCallback(Endpoint endpoint, ExchangePattern pattern, Object body, Synchronization onCompletion)
protected void doStart() throws Exception
ServiceSupport
ServiceSupport.doStop()
for more details.doStart
in class ServiceSupport
Exception
ServiceSupport.doStop()
protected void doStop() throws Exception
ServiceSupport
ServiceSupport.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 ServiceSupport
Exception
ServiceSupport.doStart()
Apache Camel