Apache Tuscany SCA Kernel Sub-Project

org.apache.tuscany.spi.wire
Interface Message

All Known Implementing Classes:
MessageImpl

public interface Message

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

Version:
$Rev $Date

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
 

Method Detail

getBody

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


setBody

void setBody(Object body)
Sets the body of the message.


setTargetInvoker

void setTargetInvoker(TargetInvoker invoker)
Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain


getTargetInvoker

TargetInvoker getTargetInvoker()
Sets the target invoker to dispatch to when the message passes through the request side of the invocation chain


getFromAddress

Object getFromAddress()
Returns the 'address' of the SCAObject where this message originates


setFromAddress

void setFromAddress(Object fromAddress)
Sets the 'address' of the SCAObject where this message originates


getMessageId

Object getMessageId()
Returns the id of the message


setMessageId

void setMessageId(Object messageId)
Sets the id of the message


getCorrelationId

Object getCorrelationId()
Returns the correlation id of the message


setCorrelationId

void setCorrelationId(Object correlationId)
Sets the correlation id of the message


isFault

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

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

setBodyWithFault

void setBodyWithFault(Object 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

Apache Tuscany SCA Kernel Sub-Project

-