Home » apache-camel-1.5.0-src » org.apache » camel » [javadoc | source]
org.apache.camel
public interface: Exchange [javadoc | source]

All Known Implementing Classes:
    GenericFileExchange, QuartzExchange, SpringIntegrationExchange, MailExchange, JmsExchange, FileExchange, MinaExchange, RemoteFileExchange, HttpExchange, DefaultExchange, StreamExchange, TraceEventExchange, JhcExchange, GroupedExchange, XmppExchange, IrcExchange, JMXExchange, CxfExchange, BeanExchange

The base message exchange interface providing access to the request, response and fault Message instances. Different providers such as JMS, JBI, CXF and HTTP can provide their own derived API to expose the underlying transport semantics to avoid the leaky abstractions of generic APIs.
Field Summary
 String CHARSET_NAME     
 String AGGREGATED_COUNT     
 String EXCEPTION_HANDLED_PROPERTY     
Method from org.apache.camel.Exchange Summary:
copy,   copyFrom,   getContext,   getException,   getExchangeId,   getFault,   getFault,   getIn,   getOut,   getOut,   getPattern,   getProperties,   getProperty,   getProperty,   getUnitOfWork,   isFailed,   isTransacted,   newInstance,   removeProperty,   setException,   setExchangeId,   setIn,   setOut,   setPattern,   setProperty,   setUnitOfWork
Method from org.apache.camel.Exchange Detail:
 public Exchange copy()
    Creates a copy of the current message exchange so that it can be forwarded to another destination
 public  void copyFrom(Exchange source)
    Copies the data into this exchange from the given exchange
 public CamelContext getContext()
    Returns the container so that a processor can resolve endpoints from URIs
 public Throwable getException()
    Returns the exception associated with this exchange
 public String getExchangeId()
    Returns the exchange id (unique)
 public Message getFault()
    Returns the fault message
 public Message getFault(boolean lazyCreate)
    Returns the fault message; optionally lazily creating one if one has not been associated with this exchange
 public Message getIn()
    Returns the inbound request message
 public Message getOut()
    Returns the outbound message, lazily creating one if one has not already been associated with this exchange. If you want to inspect this property but not force lazy creation then invoke the #getOut(boolean) method passing in false
 public Message getOut(boolean lazyCreate)
    Returns the outbound message; optionally lazily creating one if one has not been associated with this exchange
 public ExchangePattern getPattern()
 public Map<String, Object> getProperties()
    Returns all of the properties associated with the exchange
 public Object getProperty(String name)
    Returns a property associated with this exchange by name
 public T getProperty(String name,
    Class<T> type)
    Returns a property associated with this exchange by name and specifying the type required
 public UnitOfWork getUnitOfWork()
    Returns the unit of work that this exchange belongs to; which may map to zero, one or more physical transactions
 public boolean isFailed()
    Returns true if this exchange failed due to either an exception or fault
 public boolean isTransacted()
    Returns true if this exchange is transacted
 public Exchange newInstance()
    Creates a new exchange instance with empty messages, headers and properties
 public Object removeProperty(String name)
    Removes the given property on the exchange
 public  void setException(Throwable e)
    Sets the exception associated with this exchange
 public  void setExchangeId(String id)
    Set the exchange id
 public  void setIn(Message in)
    Sets the inbound message instance
 public  void setOut(Message out)
    Sets the outbound message
 public  void setPattern(ExchangePattern pattern)
 public  void setProperty(String name,
    Object value)
    Sets a property on the exchange
 public  void setUnitOfWork(UnitOfWork unitOfWork)
    Sets the unit of work that this exchange belongs to; which may map to zero, one or more physical transactions