|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Exchange
Represents a message exchange.
An exchange is used to interact with a channel
representing a link to a logical endpoint.
Exchanges are created using the Channel.
| Method Summary | ||
|---|---|---|
void |
cancel()
Cancels a pending synchronous exchange. |
|
Exchange |
copy()
Duplicates this exchange and returns a new copy |
|
void |
copyFrom(Exchange exchange)
Copy the given exchange to this one |
|
java.lang.String |
display(boolean displayContent)
Returns a string representation of this exchange. |
|
void |
ensureReReadable()
Make sure that all streams contained in the content and in attachments are transformed to re-readable sources. |
|
java.lang.Exception |
getError()
Obtains the error of this exchange |
|
Message |
getFault()
Obtains the fault message, lazily creating one if none has been associated with this exchange and if this exchange supports a faut message. |
|
Message |
getFault(boolean lazyCreate)
Returns the fault message, optionally creating one if one has not already been associated with this exchange |
|
java.lang.String |
getId()
The unique id of this exchange |
|
Message |
getIn()
Obtains the input message, lazily creating one if none has been associated with this exchange. |
|
Message |
getIn(boolean lazyCreate)
Returns the inbound message, optionally creating one if one has not already been associated with this exchange. |
|
Message |
getMessage(Type type)
Obtains the given message, lazily creating one if none has been associated with this exchange and if this exchange supports a faut message. |
|
Message |
getMessage(Type type,
boolean lazyCreate)
Returns the message of the given type, optionally creating one if one has not already been associated with this exchange |
|
javax.xml.namespace.QName |
getOperation()
The service operation of this exchange |
|
Message |
getOut()
Obtains the outbound message, lazily creating one if none has been associated with this exchange and if this exchange supports an out message. |
|
Message |
getOut(boolean lazyCreate)
Returns the outbound message, optionally creating one if one has not already been associated with this exchange |
|
Pattern |
getPattern()
The exchange pattern |
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Return all the properties associated with this exchange |
|
|
getProperty(java.lang.Class<T> type)
Get a typed property. |
|
java.lang.Object |
getProperty(java.lang.String name)
Get a given property by its name. |
|
|
getProperty(java.lang.String name,
java.lang.Class<T> type)
Returns a property associated with this exchange by name and specifying the type required |
|
Role |
getRole()
The role of the exchange. |
|
Status |
getStatus()
The status of the exchange |
|
Reference |
getTarget()
The target used for this exchange |
|
|
removeProperty(java.lang.Class<T> type)
Remove the property of the specified type |
|
java.lang.Object |
removeProperty(java.lang.String name)
Remove the given property and returns its value. |
|
void |
setError(java.lang.Exception error)
Set the error on this exchange |
|
void |
setFault(Message message)
Set the fault message. |
|
void |
setIn(Message message)
Set the inbound message. |
|
void |
setMessage(Type type,
Message message)
Set the message. |
|
void |
setOperation(javax.xml.namespace.QName operation)
The service operation of this exchange |
|
void |
setOut(Message message)
Set the outbound message. |
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Set all the properties |
|
|
setProperty(java.lang.Class<T> type,
T value)
Set a typed property on this exchange. |
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set a property on this exchange. |
|
void |
setStatus(Status status)
Set the status of the exchange |
|
void |
setTarget(Reference target)
The target used for this exchange |
|
| Method Detail |
|---|
java.lang.String getId()
Pattern getPattern()
Role getRole()
Status getStatus()
void setStatus(Status status)
status - the new statusReference getTarget()
void setTarget(Reference target)
target - the target endpointjavax.xml.namespace.QName getOperation()
void setOperation(javax.xml.namespace.QName operation)
operation - the operationjava.lang.Object getProperty(java.lang.String name)
name - the name of the property to retrieve
null if none has been set<T> T getProperty(java.lang.Class<T> type)
type - the type of the property to retrieve
null if none has been set
<T> T getProperty(java.lang.String name,
java.lang.Class<T> type)
name - the name of the propertytype - the type of the property
java.util.Map<java.lang.String,java.lang.Object> getProperties()
void setProperty(java.lang.String name,
java.lang.Object value)
null will actually remove the property for the list.
name - the name of the propertyvalue - the value for this property or null
<T> void setProperty(java.lang.Class<T> type,
T value)
type - the keyvalue - the valuejava.lang.Object removeProperty(java.lang.String name)
name - the name of the property
<T> T removeProperty(java.lang.Class<T> type)
type - the type of the property
void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
properties - the new propertiesMessage getIn()
getIn(boolean)
method passing in false
Message getIn(boolean lazyCreate)
lazyCreate - true if the message should be created
void setIn(Message message)
message - the new inbound messageMessage getOut()
getOut(boolean)
method passing in false
Message getOut(boolean lazyCreate)
void setOut(Message message)
message - the new outbound messageMessage getFault()
getFault(boolean)
method passing in false
Message getFault(boolean lazyCreate)
void setFault(Message message)
message - the new fault messageMessage getMessage(Type type)
getMessage(Type, boolean)
method passing in false
type - the type of message to retrieve
null if
this pattern does not support this type of message
Message getMessage(Type type,
boolean lazyCreate)
type - the type of message to retrieve
void setMessage(Type type,
Message message)
type - the type of the message to setmessage - the new inbound messagejava.lang.Exception getError()
void setError(java.lang.Exception error)
error - the exception that caused the exchange to failvoid copyFrom(Exchange exchange)
exchange - the exchange to copy fromExchange copy()
void ensureReReadable()
java.lang.String display(boolean displayContent)
displayContent property can be specified to
control wether the content should be displayed or not.
If set to true, the content and attachments will
be converted into re-readable objects (for java.io.InputStream
and javax.xml.transform.Source objects) and printed.
displayContent - if the content and attachments of the exchange
should be transformed if needed and displayed
or left unmodified
void cancel()
Status.Error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||