org.apache.tuscany.sca.invocation
Interface Message

All Known Implementing Classes:
ImmutableMessage, MessageImpl

public interface Message

Represents a request, response, or exception flowing through a wire


Method Summary
<T> T
getBindingContext()
          Returns the binding context in force for this message
<T> T
getBody()
          Returns the body of the message, which will be the payload or parameters associated with the wire
 EndpointReference getFrom()
          Get the end point reference of the source reference
 java.util.List<java.lang.Object> getHeaders()
          Returns a list of objects that are contained in the message header
 java.lang.Object getMessageID()
          Returns the id of the message
 Operation getOperation()
          Returns the operation that created the message.
 EndpointReference getTo()
          Get the end point reference of target service
 boolean isFault()
          Determines if the message represents a fault/exception
<T> void
setBindingContext(T bindingContext)
          Set the binding context that is in force for this message
<T> void
setBody(T body)
          Sets the body of the message.
<T> void
setFaultBody(T fault)
          Set the message body with a fault object.
 void setFrom(EndpointReference from)
          Set the end point reference of the reference originating the message
 void setMessageID(java.lang.Object messageId)
          Sets the id of the message
 void setOperation(Operation op)
          Sets the operation that created the message.
 void setTo(EndpointReference to)
          Set the end point reference of target service
 

Method Detail

getBody

<T> T getBody()
Returns the body of the message, which will be the payload or parameters associated with the wire

Returns:
The body of the message

setBody

<T> void setBody(T body)
Sets the body of the message.

Parameters:
body - The body of the message

getFrom

EndpointReference getFrom()
Get the end point reference of the source reference

Returns:
The end point reference of the reference originating the message

setFrom

void setFrom(EndpointReference from)
Set the end point reference of the reference originating the message

Parameters:
from - The end point reference of the reference originating the message

getTo

EndpointReference getTo()
Get the end point reference of target service

Returns:
The end point reference of the service that the message targets

setTo

void setTo(EndpointReference to)
Set the end point reference of target service

Parameters:
to - The end point reference of the service that the message targets

getMessageID

java.lang.Object getMessageID()
Returns the id of the message

Returns:
The message Id

setMessageID

void setMessageID(java.lang.Object messageId)
Sets the id of the message

Parameters:
messageId - The message ID

isFault

boolean isFault()
Determines if the message represents a fault/exception

Returns:
true If the message body is a fault object, false if the body is a normal payload

setFaultBody

<T> void setFaultBody(T fault)
Set the message body with a fault object. After this method is called, isFault() returns true.

Parameters:
fault - The fault object represents an exception

getOperation

Operation getOperation()
Returns the operation that created the message.

Returns:
The operation that created the message

setOperation

void setOperation(Operation op)
Sets the operation that created the message.

Parameters:
op - The operation that created the message

getHeaders

java.util.List<java.lang.Object> getHeaders()
Returns a list of objects that are contained in the message header

Returns:

getBindingContext

<T> T getBindingContext()
Returns the binding context in force for this message


setBindingContext

<T> void setBindingContext(T bindingContext)
Set the binding context that is in force for this message

Parameters:
bindingContext -