org.apache.camel
Interface ProducerTemplate<E extends Exchange>

All Superinterfaces:
Service
All Known Implementing Classes:
CamelTemplate, DefaultProducerTemplate

public interface ProducerTemplate<E extends Exchange>
extends Service

Template (named like Spring's TransactionTemplate & JmsTemplate et al) for working with Camel and sending Message instances in an Exchange to an Endpoint.

Version:
$Revision: 41776 $

Method Summary
 E request(Endpoint<E> endpoint, Processor processor)
          Send the body to an endpoint returning any result output body.
 E request(String endpointUri, Processor processor)
          Send the body to an endpoint returning any result output body.
 Object requestBody(Endpoint<E> endpoint, Object body)
          Send the body to an endpoint returning any result output body.
 Object requestBody(String endpointUri, Object body)
          Send the body to an endpoint returning any result output body.
 Object requestBodyAndHeader(Endpoint<E> endpoint, Object body, String header, Object headerValue)
          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.
 E send(E exchange)
          Sends the exchange to the default endpoint
 E send(Endpoint<E> endpoint, E exchange)
          Sends the exchange to the given endpoint
 E send(Endpoint<E> endpoint, ExchangePattern pattern, Processor processor)
          Sends an exchange to an endpoint using a supplied processor
 E send(Endpoint<E> endpoint, Processor processor)
          Sends an exchange to an endpoint using a supplied processor
 E send(Endpoint<E> endpoint, Processor processor, AsyncCallback callback)
          Sends an exchange to an endpoint using a supplied processor
 E send(Processor processor)
          Sends an exchange to the default endpoint using a supplied
 E send(String endpointUri, E exchange)
          Sends the exchange to the given endpoint
 E send(String endpointUri, ExchangePattern pattern, Processor processor)
          Sends an exchange to an endpoint using a supplied processor
 E send(String endpointUri, Processor processor)
          Sends an exchange to an endpoint using a supplied processor
 E send(String endpointUri, Processor processor, AsyncCallback callback)
          Sends an exchange to an endpoint using a supplied processor
 Object sendBody(Endpoint<E> endpoint, ExchangePattern pattern, Object body)
          Send the body to an endpoint with the given ExchangePattern returning any result output body
 Object sendBody(Endpoint<E> endpoint, Object body)
          Send the body to an endpoint returning any result output body
 Object sendBody(Object body)
          Sends the body to the default endpoint and returns the result content
 Object sendBody(String endpointUri, ExchangePattern pattern, Object body)
          Send the body to an endpoint returning any result output body
 Object sendBody(String endpointUri, Object body)
          Send the body to an endpoint returning any result output body
 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
 Object sendBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue)
          Sends the body to an endpoint with a specified header and header value
 Object sendBodyAndHeader(Object body, String header, Object headerValue)
          Sends the body to the default endpoint with a specified header and header value
 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
 Object sendBodyAndHeader(String endpointUri, Object body, String header, Object headerValue)
          Sends the body to an endpoint with a specified header and header value
 Object sendBodyAndHeaders(Endpoint endpoint, Object body, Map<String,Object> headers)
          Sends the body to an endpoint with the specified headers and header values
 Object sendBodyAndHeaders(Object body, Map<String,Object> headers)
          Sends the body to the default endpoint with the specified headers and header values
 Object sendBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers)
          Sends the body to an endpoint with the specified headers and header values
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

send

E send(E exchange)
Sends the exchange to the default endpoint

Parameters:
exchange - the exchange to send

send

E send(Processor processor)
Sends an exchange to the default endpoint using a supplied

Parameters:
processor - the transformer used to populate the new exchange Processor to populate the exchange

sendBody

Object sendBody(Object body)
Sends the body to the default endpoint and returns the result content

Parameters:
body - the body to send
Returns:
the returned message body

sendBodyAndHeader

Object sendBodyAndHeader(Object body,
                         String header,
                         Object headerValue)
Sends the body to the default endpoint with a specified header and header value

Parameters:
body - the payload send
header - the header name
headerValue - the header value
Returns:
the result

sendBodyAndHeaders

Object sendBodyAndHeaders(Object body,
                          Map<String,Object> headers)
Sends the body to the default endpoint with the specified headers and header values

Parameters:
body - the payload send
Returns:
the result

send

E send(String endpointUri,
       E exchange)
Sends the exchange to the given endpoint

Parameters:
endpointUri - the endpoint URI to send the exchange to
exchange - the exchange to send

send

E send(String endpointUri,
       Processor processor)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpointUri - the endpoint URI to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange

send

E send(String endpointUri,
       ExchangePattern pattern,
       Processor processor)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpointUri - the endpoint URI to send the exchange to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
processor - the transformer used to populate the new exchange Processor to populate the exchange

send

E send(String endpointUri,
       Processor processor,
       AsyncCallback callback)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpointUri - the endpoint URI to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange.
callback - the callback will be called when the exchange is completed.

send

E send(Endpoint<E> endpoint,
       E exchange)
Sends the exchange to the given endpoint

Parameters:
endpoint - the endpoint to send the exchange to
exchange - the exchange to send

send

E send(Endpoint<E> endpoint,
       Processor processor)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpoint - the endpoint to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange

send

E send(Endpoint<E> endpoint,
       ExchangePattern pattern,
       Processor processor)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpoint - the endpoint to send the exchange to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
processor - the transformer used to populate the new exchange Processor to populate the exchange

send

E send(Endpoint<E> endpoint,
       Processor processor,
       AsyncCallback callback)
Sends an exchange to an endpoint using a supplied processor

Parameters:
endpoint - the endpoint to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange.
callback - the callback will be called when the exchange is completed.

sendBody

Object sendBody(Endpoint<E> endpoint,
                Object body)
Send the body to an endpoint returning any result output body

Parameters:
endpoint - the endpoint to send the exchange to
body - the payload
Returns:
the result

sendBody

Object sendBody(String endpointUri,
                Object body)
Send the body to an endpoint returning any result output body

Parameters:
endpointUri - the endpoint URI to send the exchange to
body - the payload
Returns:
the result

sendBody

Object sendBody(Endpoint<E> endpoint,
                ExchangePattern pattern,
                Object body)
Send the body to an endpoint with the given ExchangePattern returning any result output body

Parameters:
endpoint - the endpoint to send the exchange to
body - the payload
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
Returns:
the result

sendBody

Object sendBody(String endpointUri,
                ExchangePattern pattern,
                Object body)
Send the body to an endpoint returning any result output body

Parameters:
endpointUri - the endpoint URI to send the exchange to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload
Returns:
the result

sendBodyAndHeader

Object sendBodyAndHeader(String endpointUri,
                         Object body,
                         String header,
                         Object headerValue)
Sends the body to an endpoint with a specified header and header value

Parameters:
endpointUri - the endpoint URI to send to
body - the payload send
header - the header name
headerValue - the header value
Returns:
the result

sendBodyAndHeader

Object sendBodyAndHeader(Endpoint endpoint,
                         Object body,
                         String header,
                         Object headerValue)
Sends the body to an endpoint with a specified header and header value

Parameters:
endpoint - the Endpoint to send to
body - the payload send
header - the header name
headerValue - the header value
Returns:
the result

sendBodyAndHeader

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

Parameters:
endpoint - the Endpoint to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload send
header - the header name
headerValue - the header value
Returns:
the result

sendBodyAndHeader

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

Parameters:
endpoint - the Endpoint URI to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload send
header - the header name
headerValue - the header value
Returns:
the result

sendBodyAndHeaders

Object sendBodyAndHeaders(String endpointUri,
                          Object body,
                          Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values

Parameters:
endpointUri - the endpoint URI to send to
body - the payload send
Returns:
the result

sendBodyAndHeaders

Object sendBodyAndHeaders(Endpoint endpoint,
                          Object body,
                          Map<String,Object> headers)
Sends the body to an endpoint with the specified headers and header values

Parameters:
endpoint - the endpoint URI to send to
body - the payload send
Returns:
the result

request

E request(Endpoint<E> endpoint,
          Processor processor)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpoint - the Endpoint to send to
processor - the processor which will populate the exchange before sending
Returns:
the result

requestBody

Object requestBody(Endpoint<E> endpoint,
                   Object body)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpoint - the Endpoint to send to
body - the payload
Returns:
the result

requestBodyAndHeader

Object requestBodyAndHeader(Endpoint<E> endpoint,
                            Object body,
                            String header,
                            Object headerValue)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpoint - the Endpoint to send to
body - the payload
header - the header name
headerValue - the header value
Returns:
the result

request

E request(String endpointUri,
          Processor processor)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpointUri - the endpoint URI to send to
processor - the processor which will populate the exchange before sending
Returns:
the result

requestBody

Object requestBody(String endpointUri,
                   Object body)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpointUri - the endpoint URI to send to
body - the payload
Returns:
the result

requestBodyAndHeader

Object requestBodyAndHeader(String endpointUri,
                            Object body,
                            String header,
                            Object headerValue)
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Parameters:
endpointUri - the endpoint URI to send to
body - the payload
header - the header name
headerValue - the header value
Returns:
the result


Copyright © 2008 IONA Open Source Community. All Rights Reserved.