org.jibx.ws.context
Class ExchangeContext

java.lang.Object
  extended by org.jibx.ws.context.Context
      extended by org.jibx.ws.context.ExchangeContext

public final class ExchangeContext
extends Context

Maintains the context for all messages in a message exchange.


Method Summary
static ExchangeContext createInOnlyExchange(InContext inboundContext)
          Creates an ExchangeContext for an IN-ONLY message exchange.
static ExchangeContext createInOutExchange(InContext inboundContext, OutContext outboundContext)
          Creates an ExchangeContext for an IN-OUT message exchange.
static ExchangeContext createOutInExchange(OutContext outboundContext, InContext inboundContext)
          Creates an ExchangeContext for an OUT-IN message exchange.
static ExchangeContext createOutOnlyExchange(OutContext outboundContext)
          Creates an ExchangeContext for an OUT-ONLY message exchange.
 MessageContext getCurrentMessageContext()
          Returns the context of the current message being processed, or null if the message exchange is complete.
 MessageContext getNextMessageContext()
          Returns the next message context in the exchange context, or null if the message exchange is complete or the current message context is the last one.
 void reset()
          Resets the state of this context, so that it can be reused by a subsequent message exchange.
 void switchMessageContext()
          Signals that the current message context is complete, and the exchange should move to the next message context.
 
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
 

Method Detail

createInOnlyExchange

public static ExchangeContext createInOnlyExchange(InContext inboundContext)
Creates an ExchangeContext for an IN-ONLY message exchange.

Parameters:
inboundContext - the context for the inbound message
Returns:
exchange context

createOutOnlyExchange

public static ExchangeContext createOutOnlyExchange(OutContext outboundContext)
Creates an ExchangeContext for an OUT-ONLY message exchange.

Parameters:
outboundContext - the context for the outbound message
Returns:
exchange context

createOutInExchange

public static ExchangeContext createOutInExchange(OutContext outboundContext,
                                                  InContext inboundContext)
Creates an ExchangeContext for an OUT-IN message exchange.

Parameters:
outboundContext - the context for the outbound message
inboundContext - the context for the inbound message
Returns:
exchange context

createInOutExchange

public static ExchangeContext createInOutExchange(InContext inboundContext,
                                                  OutContext outboundContext)
Creates an ExchangeContext for an IN-OUT message exchange.

Parameters:
inboundContext - the context for the inbound message
outboundContext - the context for the outbound message
Returns:
exchange context

getCurrentMessageContext

public MessageContext getCurrentMessageContext()
Returns the context of the current message being processed, or null if the message exchange is complete.

Returns:
current message context, or null if the exchange is complete

getNextMessageContext

public MessageContext getNextMessageContext()
Returns the next message context in the exchange context, or null if the message exchange is complete or the current message context is the last one.

Returns:
next message context, or null if the exchange will be complete after the current message context

switchMessageContext

public void switchMessageContext()
Signals that the current message context is complete, and the exchange should move to the next message context.


reset

public void reset()
Resets the state of this context, so that it can be reused by a subsequent message exchange.

Overrides:
reset in class Context


Project Web Site