org.apache.camel.impl
Class DefaultProducerTemplate

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultProducerTemplate
All Implemented Interfaces:
ProducerTemplate, Service

public class DefaultProducerTemplate
extends ServiceSupport
implements ProducerTemplate

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

Version:
$Revision: 750400 $

Constructor Summary
DefaultProducerTemplate(CamelContext context)
           
DefaultProducerTemplate(CamelContext context, Endpoint defaultEndpoint)
           
 
Method Summary
protected  Processor createBodyAndHeaderProcessor(Object body, String header, Object headerValue)
           
protected  Processor createBodyAndPropertyProcessor(Object body, String property, Object propertyValue)
           
protected  Processor createSetBodyProcessor(Object body)
           
protected  void doStart()
           
protected  void doStop()
           
protected  Object extractResultBody(Exchange result)
          Extracts the body from the given result.
protected  Object extractResultBody(Exchange result, ExchangePattern pattern)
          Extracts the body from the given result.
 CamelContext getContext()
           
 Endpoint getDefaultEndpoint()
           
protected  Endpoint getMandatoryDefaultEndpoint()
           
 Producer getProducer(Endpoint endpoint)
           
<T extends Endpoint>
T
getResolvedEndpoint(String endpointUri, Class<T> expectedClass)
           
protected  boolean hasFaultMessage(Exchange result)
           
 boolean isUseEndpointCache()
           
static DefaultProducerTemplate newInstance(CamelContext camelContext, String defaultEndpointUri)
           
 Exchange request(Endpoint endpoint, Processor processor)
          Sends an exchange to an endpoint using a supplied processor Uses an ExchangePattern.InOut message exchange pattern.
 Exchange request(String endpoint, Processor processor)
          Sends an exchange to an endpoint using a supplied processor Uses an ExchangePattern.InOut message exchange pattern.
 Object requestBody(Endpoint endpoint, Object body)
          Send the body to an endpoint returning any result output body.
 Object requestBody(Object body)
          Sends the body to the default endpoint and returns the result content Uses an ExchangePattern.InOut message exchange pattern.
 Object requestBody(String endpoint, Object body)
          Send the body to an endpoint returning any result output body.
 Object requestBodyAndHeader(Endpoint endpoint, Object body, String header, Object headerValue)
          Send the body to an endpoint returning any result output body.
 Object requestBodyAndHeader(String endpoint, Object body, String header, Object headerValue)
          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.
 Object requestBodyAndHeaders(String endpointUri, Object body, Map<String,Object> headers)
          Sends the body to an endpoint with the specified headers and header values.
protected  Endpoint resolveMandatoryEndpoint(String endpointUri)
           
 Exchange send(Endpoint endpoint, Exchange exchange)
          Sends the exchange to the given endpoint
 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(Endpoint endpoint, Processor processor, AsyncCallback callback)
          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
 Exchange send(String endpointUri, Processor processor, AsyncCallback callback)
          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
 Object sendBody(Endpoint 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, ExchangePattern pattern, Object body, Map<String,Object> headers)
          Sends the body to an endpoint with the specified headers and header values
 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, ExchangePattern pattern, Object body, Map<String,Object> headers)
          Sends the body to an 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
 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
 Object sendBodyAndProperty(Endpoint endpoint, Object body, String property, Object propertyValue)
          Sends the body to an endpoint with a specified property and property value
 Object sendBodyAndProperty(Object body, String property, Object propertyValue)
          Sends the body to the default endpoint with a specified property and property value
 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
 Object sendBodyAndProperty(String endpointUri, Object body, String property, Object propertyValue)
          Sends the body to an endpoint with a specified property and property value
 void setDefaultEndpoint(Endpoint defaultEndpoint)
           
 void setDefaultEndpointUri(String endpointUri)
          Sets the default endpoint to use if none is specified
 void setUseEndpointCache(boolean useEndpointCache)
           
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getStatus, getThreadName, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, notStarting, removeChildService, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

DefaultProducerTemplate

public DefaultProducerTemplate(CamelContext context)

DefaultProducerTemplate

public DefaultProducerTemplate(CamelContext context,
                               Endpoint defaultEndpoint)
Method Detail

newInstance

public static DefaultProducerTemplate newInstance(CamelContext camelContext,
                                                  String defaultEndpointUri)

send

public Exchange send(String endpointUri,
                     Exchange exchange)
Description copied from interface: ProducerTemplate
Sends the exchange to the given endpoint

Specified by:
send in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send the exchange to
exchange - the exchange to send
Returns:
the returned exchange

send

public Exchange send(String endpointUri,
                     Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange
Returns:
the returned exchange

send

public Exchange send(String endpointUri,
                     Processor processor,
                     AsyncCallback callback)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
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.
Returns:
the returned exchange

send

public Exchange send(String endpointUri,
                     ExchangePattern pattern,
                     Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
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
Returns:
the returned exchange

send

public Exchange send(Endpoint endpoint,
                     Exchange exchange)
Description copied from interface: ProducerTemplate
Sends the exchange to the given endpoint

Specified by:
send in interface ProducerTemplate
Parameters:
endpoint - the endpoint to send the exchange to
exchange - the exchange to send
Returns:
the returned exchange

send

public Exchange send(Endpoint endpoint,
                     Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
Parameters:
endpoint - the endpoint to send the exchange to
processor - the transformer used to populate the new exchange Processor to populate the exchange
Returns:
the returned exchange

send

public Exchange send(Endpoint endpoint,
                     Processor processor,
                     AsyncCallback callback)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
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.
Returns:
the returned exchange

send

public Exchange send(Endpoint endpoint,
                     ExchangePattern pattern,
                     Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
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
Returns:
the returned exchange

sendBody

public Object sendBody(Endpoint endpoint,
                       ExchangePattern pattern,
                       Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint with the given ExchangePattern returning any result output body

Specified by:
sendBody in interface ProducerTemplate
Parameters:
endpoint - the endpoint to send the exchange to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload
Returns:
the result (see class javadoc)

sendBody

public Object sendBody(Endpoint endpoint,
                       Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body

Specified by:
sendBody in interface ProducerTemplate
Parameters:
endpoint - the endpoint to send the exchange to
body - the payload
Returns:
the result (see class javadoc)

sendBody

public Object sendBody(String endpointUri,
                       Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body

Specified by:
sendBody in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send the exchange to
body - the payload
Returns:
the result (see class javadoc)

sendBody

public Object sendBody(String endpointUri,
                       ExchangePattern pattern,
                       Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body

Specified by:
sendBody in interface ProducerTemplate
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 (see class javadoc)

sendBodyAndHeader

public Object sendBodyAndHeader(String endpointUri,
                                Object body,
                                String header,
                                Object headerValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified header and header value

Specified by:
sendBodyAndHeader in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send to
body - the payload to send
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

sendBodyAndHeader

public Object sendBodyAndHeader(Endpoint endpoint,
                                Object body,
                                String header,
                                Object headerValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified header and header value

Specified by:
sendBodyAndHeader in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
body - the payload to send
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

sendBodyAndHeader

public Object sendBodyAndHeader(Endpoint endpoint,
                                ExchangePattern pattern,
                                Object body,
                                String header,
                                Object headerValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified header and header value

Specified by:
sendBodyAndHeader in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

sendBodyAndHeader

public Object sendBodyAndHeader(String endpoint,
                                ExchangePattern pattern,
                                Object body,
                                String header,
                                Object headerValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified header and header value

Specified by:
sendBodyAndHeader in interface ProducerTemplate
Parameters:
endpoint - the Endpoint URI to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

sendBodyAndProperty

public Object sendBodyAndProperty(String endpointUri,
                                  Object body,
                                  String property,
                                  Object propertyValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified property and property value

Specified by:
sendBodyAndProperty in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send to
body - the payload to send
property - the property name
propertyValue - the property value
Returns:
the result (see class javadoc)

sendBodyAndProperty

public Object sendBodyAndProperty(Endpoint endpoint,
                                  Object body,
                                  String property,
                                  Object propertyValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified property and property value

Specified by:
sendBodyAndProperty in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
body - the payload to send
property - the property name
propertyValue - the property value
Returns:
the result (see class javadoc)

sendBodyAndProperty

public Object sendBodyAndProperty(Endpoint endpoint,
                                  ExchangePattern pattern,
                                  Object body,
                                  String property,
                                  Object propertyValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified property and property value

Specified by:
sendBodyAndProperty in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
property - the property name
propertyValue - the property value
Returns:
the result (see class javadoc)

sendBodyAndProperty

public Object sendBodyAndProperty(String endpoint,
                                  ExchangePattern pattern,
                                  Object body,
                                  String property,
                                  Object propertyValue)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with a specified property and property value

Specified by:
sendBodyAndProperty in interface ProducerTemplate
Parameters:
endpoint - the Endpoint URI to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
property - the property name
propertyValue - the property value
Returns:
the result (see class javadoc)

sendBodyAndHeaders

public Object sendBodyAndHeaders(String endpointUri,
                                 Object body,
                                 Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values

Specified by:
sendBodyAndHeaders in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send to
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

sendBodyAndHeaders

public Object sendBodyAndHeaders(Endpoint endpoint,
                                 Object body,
                                 Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values

Specified by:
sendBodyAndHeaders in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

sendBodyAndHeaders

public Object sendBodyAndHeaders(String endpointUri,
                                 ExchangePattern pattern,
                                 Object body,
                                 Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values

Specified by:
sendBodyAndHeaders in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

sendBodyAndHeaders

public Object sendBodyAndHeaders(Endpoint endpoint,
                                 ExchangePattern pattern,
                                 Object body,
                                 Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values

Specified by:
sendBodyAndHeaders in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

request

public Exchange request(Endpoint endpoint,
                        Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
request in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
processor - the processor which will populate the exchange before sending
Returns:
the result (see class javadoc)

requestBody

public Object requestBody(Object body)
Description copied from interface: ProducerTemplate
Sends the body to the default endpoint and returns the result content Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBody in interface ProducerTemplate
Parameters:
body - the payload to send
Returns:
the result (see class javadoc)

requestBody

public Object requestBody(Endpoint endpoint,
                          Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBody in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
body - the payload
Returns:
the result (see class javadoc)

requestBodyAndHeader

public Object requestBodyAndHeader(Endpoint endpoint,
                                   Object body,
                                   String header,
                                   Object headerValue)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBodyAndHeader in interface ProducerTemplate
Parameters:
endpoint - the Endpoint to send to
body - the payload
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

request

public Exchange request(String endpoint,
                        Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to an endpoint using a supplied processor Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
request in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
processor - the processor which will populate the exchange before sending
Returns:
the result (see class javadoc)

requestBody

public Object requestBody(String endpoint,
                          Object body)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBody in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
body - the payload
Returns:
the result (see class javadoc)

requestBodyAndHeader

public Object requestBodyAndHeader(String endpoint,
                                   Object body,
                                   String header,
                                   Object headerValue)
Description copied from interface: ProducerTemplate
Send the body to an endpoint returning any result output body. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBodyAndHeader in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
body - the payload
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

requestBodyAndHeaders

public Object requestBodyAndHeaders(String endpointUri,
                                    Object body,
                                    Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBodyAndHeaders in interface ProducerTemplate
Parameters:
endpointUri - the endpoint URI to send to
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

requestBodyAndHeaders

public Object requestBodyAndHeaders(Endpoint endpoint,
                                    Object body,
                                    Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to an endpoint with the specified headers and header values. Uses an ExchangePattern.InOut message exchange pattern.

Specified by:
requestBodyAndHeaders in interface ProducerTemplate
Parameters:
endpoint - the endpoint URI to send to
body - the payload to send
headers - headers
Returns:
the result (see class javadoc)

sendBody

public Object sendBody(Object body)
Description copied from interface: ProducerTemplate
Sends the body to the default endpoint and returns the result content

Specified by:
sendBody in interface ProducerTemplate
Parameters:
body - the payload to send
Returns:
the result (see class javadoc)

send

public Exchange send(Exchange exchange)
Description copied from interface: ProducerTemplate
Sends the exchange to the default endpoint

Specified by:
send in interface ProducerTemplate
Parameters:
exchange - the exchange to send
Returns:
the returned exchange

send

public Exchange send(Processor processor)
Description copied from interface: ProducerTemplate
Sends an exchange to the default endpoint using a supplied processor

Specified by:
send in interface ProducerTemplate
Parameters:
processor - the transformer used to populate the new exchange Processor to populate the exchange
Returns:
the returned exchange

sendBodyAndHeader

public Object sendBodyAndHeader(Object body,
                                String header,
                                Object headerValue)
Description copied from interface: ProducerTemplate
Sends the body to the default endpoint with a specified header and header value

Specified by:
sendBodyAndHeader in interface ProducerTemplate
Parameters:
body - the payload to send
header - the header name
headerValue - the header value
Returns:
the result (see class javadoc)

sendBodyAndProperty

public Object sendBodyAndProperty(Object body,
                                  String property,
                                  Object propertyValue)
Description copied from interface: ProducerTemplate
Sends the body to the default endpoint with a specified property and property value

Specified by:
sendBodyAndProperty in interface ProducerTemplate
Parameters:
body - the payload to send
property - the property name
propertyValue - the property value
Returns:
the result (see class javadoc)

sendBodyAndHeaders

public Object sendBodyAndHeaders(Object body,
                                 Map<String,Object> headers)
Description copied from interface: ProducerTemplate
Sends the body to the default endpoint with the specified headers and header values

Specified by:
sendBodyAndHeaders in interface ProducerTemplate
Parameters:
body - the payload to send
headers - the headers
Returns:
the result (see class javadoc)

getProducer

public Producer getProducer(Endpoint endpoint)

getContext

public CamelContext getContext()

getDefaultEndpoint

public Endpoint getDefaultEndpoint()

setDefaultEndpoint

public void setDefaultEndpoint(Endpoint defaultEndpoint)

setDefaultEndpointUri

public void setDefaultEndpointUri(String endpointUri)
Sets the default endpoint to use if none is specified


isUseEndpointCache

public boolean isUseEndpointCache()

setUseEndpointCache

public void setUseEndpointCache(boolean useEndpointCache)

getResolvedEndpoint

public <T extends Endpoint> T getResolvedEndpoint(String endpointUri,
                                                  Class<T> expectedClass)

createBodyAndHeaderProcessor

protected Processor createBodyAndHeaderProcessor(Object body,
                                                 String header,
                                                 Object headerValue)

createBodyAndPropertyProcessor

protected Processor createBodyAndPropertyProcessor(Object body,
                                                   String property,
                                                   Object propertyValue)

createSetBodyProcessor

protected Processor createSetBodyProcessor(Object body)

resolveMandatoryEndpoint

protected Endpoint resolveMandatoryEndpoint(String endpointUri)

getMandatoryDefaultEndpoint

protected Endpoint getMandatoryDefaultEndpoint()

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

extractResultBody

protected Object extractResultBody(Exchange result)
Extracts the body from the given result.

Parameters:
result - the result
Returns:
the result, can be null.

extractResultBody

protected Object extractResultBody(Exchange result,
                                   ExchangePattern pattern)
Extracts the body from the given result.

If the exchange pattern is provided it will try to honor it and retrive the body from either IN or OUT according to the pattern.

Parameters:
result - the result
pattern - exchange pattern if given, can be null
Returns:
the result, can be null.

hasFaultMessage

protected boolean hasFaultMessage(Exchange result)


Copyright © 2009 Apache Software Foundation. All Rights Reserved.