org.apache.tuscany.sca.implementation.notification
Class ImmutableMessage

java.lang.Object
  extended by org.apache.tuscany.sca.implementation.notification.ImmutableMessage
All Implemented Interfaces:
Message

public class ImmutableMessage
extends java.lang.Object
implements Message


Constructor Summary
ImmutableMessage()
           
 
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 getReplyTo()
           
 EndpointReference getTo()
          Get the end point reference of target service
 RuntimeWire getWire()
           
 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 arg0)
          Sets the body of the message.
<T> void
setFaultBody(T arg0)
          Set the message body with a fault object.
 void setFrom(EndpointReference arg0)
          Set the end point reference of the reference originating the message
 void setMessageID(java.lang.Object arg0)
          Sets the id of the message
 void setOperation(Operation op)
          Sets the operation that created the message.
 void setTo(EndpointReference arg0)
          Set the end point reference of target service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmutableMessage

public ImmutableMessage()
Method Detail

getBody

public <T> T getBody()
Description copied from interface: Message
Returns the body of the message, which will be the payload or parameters associated with the wire

Specified by:
getBody in interface Message
Returns:
The body of the message

getFrom

public EndpointReference getFrom()
Description copied from interface: Message
Get the end point reference of the source reference

Specified by:
getFrom in interface Message
Returns:
The end point reference of the reference originating the message

getMessageID

public java.lang.Object getMessageID()
Description copied from interface: Message
Returns the id of the message

Specified by:
getMessageID in interface Message
Returns:
The message Id

getTo

public EndpointReference getTo()
Description copied from interface: Message
Get the end point reference of target service

Specified by:
getTo in interface Message
Returns:
The end point reference of the service that the message targets

getWire

public RuntimeWire getWire()

isFault

public boolean isFault()
Description copied from interface: Message
Determines if the message represents a fault/exception

Specified by:
isFault in interface Message
Returns:
true If the message body is a fault object, false if the body is a normal payload

setBody

public <T> void setBody(T arg0)
Description copied from interface: Message
Sets the body of the message.

Specified by:
setBody in interface Message
Parameters:
arg0 - The body of the message

setFaultBody

public <T> void setFaultBody(T arg0)
Description copied from interface: Message
Set the message body with a fault object. After this method is called, isFault() returns true.

Specified by:
setFaultBody in interface Message
Parameters:
arg0 - The fault object represents an exception

setFrom

public void setFrom(EndpointReference arg0)
Description copied from interface: Message
Set the end point reference of the reference originating the message

Specified by:
setFrom in interface Message
Parameters:
arg0 - The end point reference of the reference originating the message

setMessageID

public void setMessageID(java.lang.Object arg0)
Description copied from interface: Message
Sets the id of the message

Specified by:
setMessageID in interface Message
Parameters:
arg0 - The message ID

setTo

public void setTo(EndpointReference arg0)
Description copied from interface: Message
Set the end point reference of target service

Specified by:
setTo in interface Message
Parameters:
arg0 - The end point reference of the service that the message targets

getOperation

public Operation getOperation()
Description copied from interface: Message
Returns the operation that created the message.

Specified by:
getOperation in interface Message
Returns:
The operation that created the message

setOperation

public void setOperation(Operation op)
Description copied from interface: Message
Sets the operation that created the message.

Specified by:
setOperation in interface Message
Parameters:
op - The operation that created the message

getReplyTo

public EndpointReference getReplyTo()
See Also:
org.apache.tuscany.sca.invocation.Message#getReplyTo()

getHeaders

public java.util.List<java.lang.Object> getHeaders()
Description copied from interface: Message
Returns a list of objects that are contained in the message header

Specified by:
getHeaders in interface Message
Returns:

getBindingContext

public <T> T getBindingContext()
Description copied from interface: Message
Returns the binding context in force for this message

Specified by:
getBindingContext in interface Message

setBindingContext

public <T> void setBindingContext(T bindingContext)
Description copied from interface: Message
Set the binding context that is in force for this message

Specified by:
setBindingContext in interface Message