Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.wire
Class MessageImpl

java.lang.Object
  extended by org.apache.tuscany.spi.wire.MessageImpl
All Implemented Interfaces:
Message

public class MessageImpl
extends Object
implements Message

The default implementation of a message flowed through a wire during an invocation

Version:
$Rev $Date

Constructor Summary
MessageImpl()
           
 
Method Summary
 Object getBody()
          Returns the body of the message, which will be the payload or parameters associated with the wire
 Object getCorrelationId()
          Returns the correlation id of the message
 Object getFromAddress()
          Returns the 'address' of the SCAObject where this message originates
 Object getMessageId()
          Returns the id of the message
 TargetInvoker getTargetInvoker()
          Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain
 boolean isFault()
          Test if the message represents a fault/exception
 void setBody(Object body)
          Sets the body of the message.
 void setBodyWithFault(Object fault)
          Set the message body with a fault object.
 void setCorrelationId(Object correlationId)
          Sets the correlation id of the message
 void setFromAddress(Object fromAddress)
          Sets the 'address' of the SCAObject where this message originates
 void setMessageId(Object messageId)
          Sets the id of the message
 void setTargetInvoker(TargetInvoker invoker)
          Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageImpl

public MessageImpl()
Method Detail

getBody

public Object 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

setBody

public void setBody(Object body)
Description copied from interface: Message
Sets the body of the message.

Specified by:
setBody in interface Message

setTargetInvoker

public void setTargetInvoker(TargetInvoker invoker)
Description copied from interface: Message
Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain

Specified by:
setTargetInvoker in interface Message

getTargetInvoker

public TargetInvoker getTargetInvoker()
Description copied from interface: Message
Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain

Specified by:
getTargetInvoker in interface Message

getFromAddress

public Object getFromAddress()
Description copied from interface: Message
Returns the 'address' of the SCAObject where this message originates

Specified by:
getFromAddress in interface Message

setFromAddress

public void setFromAddress(Object fromAddress)
Description copied from interface: Message
Sets the 'address' of the SCAObject where this message originates

Specified by:
setFromAddress in interface Message

getMessageId

public Object getMessageId()
Description copied from interface: Message
Returns the id of the message

Specified by:
getMessageId in interface Message

setMessageId

public void setMessageId(Object messageId)
Description copied from interface: Message
Sets the id of the message

Specified by:
setMessageId in interface Message

getCorrelationId

public Object getCorrelationId()
Description copied from interface: Message
Returns the correlation id of the message

Specified by:
getCorrelationId in interface Message

setCorrelationId

public void setCorrelationId(Object correlationId)
Description copied from interface: Message
Sets the correlation id of the message

Specified by:
setCorrelationId in interface Message

isFault

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

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

setBodyWithFault

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

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

Apache Tuscany SCA Kernel Sub-Project

-