|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProducerTemplate
Template for working with Camel and sending Message
instances in an
Exchange
to an Endpoint
.
CamelExecutionException
while others stores any thrown exception on the returned
Exchange
.
ProducerTemplate
is thread safe.
FailedToCreateProducerException
in
case the Producer
could not be created. Or a NoSuchEndpointException
if the endpoint could
not be resolved. There may be other related exceptions being thrown which occurs before the Producer
has started sending the message.
CamelExecutionException
if processing failed during routing
with the caused exception wrappedService.stop()
the template.
Method Summary | ||
---|---|---|
Future<Exchange> |
asyncCallback(Endpoint endpoint,
Exchange exchange,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Exchange> |
asyncCallback(Endpoint endpoint,
Processor processor,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint using a supplied processor. |
|
Future<Exchange> |
asyncCallback(String endpointUri,
Exchange exchange,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Exchange> |
asyncCallback(String endpointUri,
Processor processor,
Synchronization onCompletion)
Sends an asynchronous exchange to the given endpoint using a supplied processor. |
|
Future<Object> |
asyncCallbackRequestBody(Endpoint endpoint,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncCallbackRequestBody(String endpointUri,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncCallbackSendBody(Endpoint endpoint,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncCallbackSendBody(String endpointUri,
Object body,
Synchronization onCompletion)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBody(Endpoint endpoint,
Object body)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBody(Endpoint endpoint,
Object body,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBody(String endpointUri,
Object body)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBody(String endpointUri,
Object body,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBodyAndHeader(Endpoint endpoint,
Object body,
String header,
Object headerValue,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBodyAndHeader(String endpointUri,
Object body,
String header,
Object headerValue,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBodyAndHeaders(Endpoint endpoint,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncRequestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers)
Sends an asynchronous body to the given endpoint. |
|
|
asyncRequestBodyAndHeaders(String endpointUri,
Object body,
Map<String,Object> headers,
Class<T> type)
Sends an asynchronous body to the given endpoint. |
|
Future<Exchange> |
asyncSend(Endpoint endpoint,
Exchange exchange)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Exchange> |
asyncSend(Endpoint endpoint,
Processor processor)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Exchange> |
asyncSend(String endpointUri,
Exchange exchange)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Exchange> |
asyncSend(String endpointUri,
Processor processor)
Sends an asynchronous exchange to the given endpoint. |
|
Future<Object> |
asyncSendBody(Endpoint endpoint,
Object body)
Sends an asynchronous body to the given endpoint. |
|
Future<Object> |
asyncSendBody(String endpointUri,
Object body)
Sends an asynchronous body to the given endpoint. |
|
|
extractFutureBody(Future<Object> future,
Class<T> type)
Gets the response body from the future handle, will wait until the response is ready. |
|
|
extractFutureBody(Future<Object> 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. |
|
CamelContext |
getCamelContext()
Get the CamelContext |
|
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 |
|
int |
getMaximumCacheSize()
Gets the maximum cache size used in the backing cache pools. |
|
boolean |
isEventNotifierEnabled()
Whether the EventNotifier should be
used by this ProducerTemplate to send events about the Exchange
being sent. |
|
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 endpointUri,
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. |
|
|
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. |
|
|
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 endpointUri,
Object body)
Send the body to an endpoint returning any result output body. |
|
|
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. |
|
|
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 endpointUri,
Object body,
String header,
Object headerValue)
Send the body to an endpoint returning any result output body. |
|
|
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. |
|
|
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. |
|
|
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. |
|
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,
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 uri to use if none is specified |
|
void |
setEventNotifierEnabled(boolean enabled)
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. |
Methods inherited from interface org.apache.camel.Service |
---|
start, stop |
Method Detail |
---|
CamelContext getCamelContext()
CamelContext
int getMaximumCacheSize()
void setMaximumCacheSize(int maximumCacheSize)
maximumCacheSize
- the custom maximum cache sizeint getCurrentCacheSize()
Endpoint getDefaultEndpoint()
void setDefaultEndpoint(Endpoint defaultEndpoint)
defaultEndpoint
- the default endpoint instancevoid setDefaultEndpointUri(String endpointUri)
endpointUri
- the default endpoint urivoid setEventNotifierEnabled(boolean enabled)
EventNotifier
should be
used by this ProducerTemplate
to send events about the Exchange
being sent.
By default this is enabled.
enabled
- true to enable, false to disable.boolean isEventNotifierEnabled()
EventNotifier
should be
used by this ProducerTemplate
to send events about the Exchange
being sent.
Exchange send(Exchange exchange)
Exchange.getException()
.
exchange
- the exchange to send
Exchange send(Processor processor)
Exchange.getException()
.
processor
- the transformer used to populate the new exchange
Processor
to populate the exchange
void sendBody(Object body) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to send
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeader(Object body, String header, Object headerValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to sendheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndProperty(Object body, String property, Object propertyValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to sendproperty
- the property namepropertyValue
- the property value
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeaders(Object body, Map<String,Object> headers) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to sendheaders
- the headers
CamelExecutionException
- if the processing of the exchange failedExchange send(String endpointUri, Exchange exchange)
Exchange.getException()
.
endpointUri
- the endpoint URI to send the exchange toexchange
- the exchange to send
CamelExecutionException
- if the processing of the exchange failedExchange send(String endpointUri, Processor processor)
Exchange.getException()
.
endpointUri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchange
CamelExecutionException
- if the processing of the exchange failedExchange send(String endpointUri, ExchangePattern pattern, Processor processor)
Exchange.getException()
.
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 exchange
Exchange send(Endpoint endpoint, Exchange exchange)
Exchange.getException()
.
endpoint
- the endpoint to send the exchange toexchange
- the exchange to send
Exchange send(Endpoint endpoint, Processor processor)
Exchange.getException()
.
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchange
Exchange send(Endpoint endpoint, ExchangePattern pattern, Processor processor)
Exchange.getException()
.
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 exchange
void sendBody(Endpoint endpoint, Object body) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint to send the exchange tobody
- the payload
CamelExecutionException
- if the processing of the exchange failedvoid sendBody(String endpointUri, Object body) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send the exchange tobody
- the payload
CamelExecutionException
- if the processing of the exchange failedObject sendBody(Endpoint endpoint, ExchangePattern pattern, Object body) throws CamelExecutionException
ExchangePattern
returning any result output body
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint to send the exchange tobody
- the payloadpattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedObject sendBody(String endpointUri, ExchangePattern pattern, Object body) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload to sendheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payload to sendheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndHeader(Endpoint endpoint, ExchangePattern pattern, Object body, String header, Object headerValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
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 value
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndHeader(String endpoint, ExchangePattern pattern, Object body, String header, Object headerValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
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 value
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndProperty(String endpointUri, Object body, String property, Object propertyValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload to sendproperty
- the property namepropertyValue
- the property value
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndProperty(Endpoint endpoint, Object body, String property, Object propertyValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payload to sendproperty
- the property namepropertyValue
- the property value
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndProperty(Endpoint endpoint, ExchangePattern pattern, Object body, String property, Object propertyValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
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 value
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndProperty(String endpoint, ExchangePattern pattern, Object body, String property, Object propertyValue) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
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 value
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headers
CamelExecutionException
- if the processing of the exchange failedvoid sendBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headers
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndHeaders(String endpointUri, ExchangePattern pattern, Object body, Map<String,Object> headers) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheaders
- headers
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedObject sendBodyAndHeaders(Endpoint endpoint, ExchangePattern pattern, Object body, Map<String,Object> headers) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint URI to send topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
body
- the payload to sendheaders
- headers
ExchangePattern
is OUT capable, otherwise null
CamelExecutionException
- if the processing of the exchange failedExchange request(Endpoint endpoint, Processor processor)
ExchangePattern.InOut
message exchange pattern.
Exchange.getException()
.
endpoint
- the Endpoint to send toprocessor
- the processor which will populate the exchange before sending
Exchange request(String endpointUri, Processor processor)
ExchangePattern.InOut
message exchange pattern.
Exchange.getException()
.
endpointUri
- the endpoint URI to send toprocessor
- the processor which will populate the exchange before sending
Object requestBody(Object body) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to send
CamelExecutionException
- if the processing of the exchange failed<T> T requestBody(Object body, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to sendtype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBody(Endpoint endpoint, Object body) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payload
CamelExecutionException
- if the processing of the exchange failed<T> T requestBody(Endpoint endpoint, Object body, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payloadtype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBody(String endpointUri, Object body) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload
CamelExecutionException
- if the processing of the exchange failed<T> T requestBody(String endpointUri, Object body, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payloadtype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeader(Object body, String header, Object headerValue) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
body
- the payloadheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payloadheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failed<T> T requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the Endpoint to send tobody
- the payloadheader
- the header nameheaderValue
- the header valuetype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payloadheader
- the header nameheaderValue
- the header value
CamelExecutionException
- if the processing of the exchange failed<T> T requestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payloadheader
- the header nameheaderValue
- the header valuetype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headers
CamelExecutionException
- if the processing of the exchange failed<T> T requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpointUri
- the endpoint URI to send tobody
- the payload to sendheaders
- headerstype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headers
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeaders(Object body, Map<String,Object> headers) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
body
- the payload to sendheaders
- headers
CamelExecutionException
- if the processing of the exchange failed<T> T requestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers, Class<T> type) throws CamelExecutionException
ExchangePattern.InOut
message exchange pattern.
CamelExecutionException
with
the caused exception wrapped.
endpoint
- the endpoint URI to send tobody
- the payload to sendheaders
- headerstype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedvoid setExecutorService(ExecutorService executorService)
executorService
- the executor service.Future<Exchange> asyncSend(String endpointUri, Exchange exchange)
endpointUri
- the endpoint URI to send the exchange toexchange
- the exchange to send
Future<Exchange> asyncSend(String endpointUri, Processor processor)
endpointUri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchange
Future<Object> asyncSendBody(String endpointUri, Object body)
ExchangePattern.InOnly
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to send
Future<Object> asyncRequestBody(String endpointUri, Object body)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to send
Future<Object> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header value
Future<Object> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheaders
- headers
<T> Future<T> asyncRequestBody(String endpointUri, Object body, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendtype
- the expected response type
<T> Future<T> asyncRequestBodyAndHeader(String endpointUri, Object body, String header, Object headerValue, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valuetype
- the expected response type
<T> Future<T> asyncRequestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendheaders
- headerstype
- the expected response type
Future<Exchange> asyncSend(Endpoint endpoint, Exchange exchange)
endpoint
- the endpoint to send the exchange toexchange
- the exchange to send
Future<Exchange> asyncSend(Endpoint endpoint, Processor processor)
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
Future<Object> asyncSendBody(Endpoint endpoint, Object body)
ExchangePattern.InOnly
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to send
Future<Object> asyncRequestBody(Endpoint endpoint, Object body)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to send
Future<Object> asyncRequestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header value
Future<Object> asyncRequestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendheaders
- headers
<T> Future<T> asyncRequestBody(Endpoint endpoint, Object body, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendtype
- the expected response type
<T> Future<T> asyncRequestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendheader
- the header nameheaderValue
- the header valuetype
- the expected response type
<T> Future<T> asyncRequestBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendheaders
- headerstype
- the expected response type
<T> T extractFutureBody(Future<Object> future, Class<T> type) throws CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
future
- the handle to get the responsetype
- the expected response type
CamelExecutionException
- if the processing of the exchange failed<T> T extractFutureBody(Future<Object> future, long timeout, TimeUnit unit, Class<T> type) throws TimeoutException, CamelExecutionException
CamelExecutionException
with
the caused exception wrapped.
future
- the handle to get the responsetimeout
- the maximum time to waitunit
- the time unit of the timeout argumenttype
- the expected response type
TimeoutException
- if the wait timed out
CamelExecutionException
- if the processing of the exchange failedFuture<Exchange> asyncCallback(String endpointUri, Exchange exchange, Synchronization onCompletion)
endpointUri
- the endpoint URI to send the exchange toexchange
- the exchange to sendonCompletion
- callback invoked when exchange has been completed
Future<Exchange> asyncCallback(Endpoint endpoint, Exchange exchange, Synchronization onCompletion)
endpoint
- the endpoint to send the exchange toexchange
- the exchange to sendonCompletion
- callback invoked when exchange has been completed
Future<Exchange> asyncCallback(String endpointUri, Processor processor, Synchronization onCompletion)
endpointUri
- 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 completed
Future<Exchange> asyncCallback(Endpoint endpoint, Processor processor, Synchronization onCompletion)
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 completed
Future<Object> asyncCallbackSendBody(String endpointUri, Object body, Synchronization onCompletion)
ExchangePattern.InOnly
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completed
Future<Object> asyncCallbackSendBody(Endpoint endpoint, Object body, Synchronization onCompletion)
ExchangePattern.InOnly
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completed
Future<Object> asyncCallbackRequestBody(String endpointUri, Object body, Synchronization onCompletion)
ExchangePattern.InOut
message exchange pattern.
endpointUri
- the endpoint URI to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completed
Future<Object> asyncCallbackRequestBody(Endpoint endpoint, Object body, Synchronization onCompletion)
ExchangePattern.InOut
message exchange pattern.
endpoint
- the endpoint to send the exchange tobody
- the body to sendonCompletion
- callback invoked when exchange has been completed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |