|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProducerTemplate
Template (named like Spring's TransactionTemplate & JmsTemplate
et al) for working with Camel and sending Message
instances in an
Exchange
to an Endpoint
.
RuntimeCamelException
if processing of
the Exchange
failed and an Exception occured. The getCause
method on RuntimeCamelException
returns the wrapper original caused
exception.
All the sendBody methods will return the content according to this strategy
RuntimeCamelException
as stated above
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 future,
Class<T> type)
Gets the response body from the future handle, will wait until the response is ready. |
|
|
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. |
|
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(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(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 |
|
Exchange |
send(Endpoint endpoint,
ExchangePattern pattern,
Processor processor)
Sends an exchange to an endpoint using a supplied processor |
|
Exchange |
send(Endpoint endpoint,
Processor processor)
Sends an exchange to an endpoint using a supplied processor |
|
Exchange |
send(Exchange exchange)
Sends the exchange to the default endpoint |
|
Exchange |
send(Processor processor)
Sends an exchange to the default endpoint using a supplied processor |
|
Exchange |
send(String endpointUri,
Exchange exchange)
Sends the exchange to the given endpoint |
|
Exchange |
send(String endpointUri,
ExchangePattern pattern,
Processor processor)
Sends an exchange to an endpoint using a supplied processor |
|
Exchange |
send(String endpointUri,
Processor processor)
Sends an exchange to an endpoint using a supplied processor |
|
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 |
setExecutorService(ExecutorService executorService)
Sets the executor service to use for async messaging. |
Methods inherited from interface org.apache.camel.Service |
---|
start, stop |
Method Detail |
---|
Exchange send(Exchange exchange)
exchange
- the exchange to send
Exchange send(Processor processor)
processor
- the transformer used to populate the new exchange
Processor
to populate the exchange
void sendBody(Object body)
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)
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)
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)
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)
endpointUri
- the endpoint URI to send the exchange toexchange
- the exchange to send
Exchange send(String endpointUri, Processor processor)
endpointUri
- the endpoint URI to send the exchange toprocessor
- the transformer used to populate the new exchange
Processor
to populate the exchange
Exchange send(String endpointUri, ExchangePattern pattern, Processor processor)
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)
endpoint
- the endpoint to send the exchange toexchange
- the exchange to send
Exchange send(Endpoint endpoint, Processor processor)
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)
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)
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)
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)
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.
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)
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)
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)
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)
CamelExecutionException
with
the caused exception wrapped.
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
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.
endpointUri
- the endpoint URI to send toprocessor
- the processor which will populate the exchange before sending
Object requestBody(Object body)
ExchangePattern.InOut
message exchange pattern.
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.
body
- the payload to send
CamelExecutionException
- if the processing of the exchange failed<T> T requestBody(Object body, Class<T> type)
ExchangePattern.InOut
message exchange pattern.
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.
body
- the payload to sendtype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBody(Endpoint endpoint, Object body)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
endpointUri
- the endpoint URI to send tobody
- the payloadtype
- the expected response type
CamelExecutionException
- if the processing of the exchange failedObject requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ExchangePattern.InOut
message exchange pattern.
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.
endpoint
- the endpoint URI to send tobody
- 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)
ExchangePattern.InOut
message exchange pattern.
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.
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)
ScheduledExecutorService
with a pool of 5 threads.
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 future, Class<T> type)
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 future, long timeout, TimeUnit unit, Class<T> type) throws TimeoutException
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 |