org.jibx.ws.context
Class MessageContext

java.lang.Object
  extended by org.jibx.ws.context.Context
      extended by org.jibx.ws.context.MessageContext
Direct Known Subclasses:
InContext, OutContext

public abstract class MessageContext
extends Context

Defines the context for sending or receiving an individual message.


Constructor Summary
MessageContext()
           
 
Method Summary
 Object getBody()
          Get message body.
 ExchangeContext getExchangeContext()
          Get the context of the enclosing message exchange.
abstract  boolean isOutbound()
          Returns whether the message context is for an outbound or inbound message.
 void reset()
          Resets the state of this context and all associated commands and handlers for subsequent re-use of this context.
 void setBody(Object body)
          Set message body.
 
Methods inherited from class org.jibx.ws.context.Context
getAttribute, getAttributeNames, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageContext

public MessageContext()
Method Detail

getExchangeContext

public final ExchangeContext getExchangeContext()
Get the context of the enclosing message exchange. The exchange context stores state across all messages in the message exchange.

Returns:
exchangeContext the context of the message exchange

isOutbound

public abstract boolean isOutbound()
Returns whether the message context is for an outbound or inbound message.

Returns:
true if the context is for an outbound message, false for inbound.

getBody

public final Object getBody()
Get message body.

Returns:
body

setBody

public final void setBody(Object body)
Set message body.

Parameters:
body - the message body

reset

public void reset()
Resets the state of this context and all associated commands and handlers for subsequent re-use of this context.

Overrides:
reset in class Context


Project Web Site