|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jibx.ws.context.Context org.jibx.ws.context.MessageContext org.jibx.ws.context.OutContext
public final class OutContext
The context for the processing of an outbound message. The context provides access to the phase object for each phase
of processing. It can also be used to store and retrieve state using the Context.setAttribute(String, Object)
and
Context.getAttribute(String)
methods.
Constructor Summary | |
---|---|
OutContext()
|
Method Summary | |
---|---|
void |
addHandler(org.jibx.ws.context.Phase phase,
OutHandler handler)
Adds a handler to the specified phase of the outbound message handling. |
boolean |
hasHandlers(org.jibx.ws.context.Phase phase)
Returns whether the specified phase has any handlers. |
void |
invokeBodyWriter(IXMLWriter xmlWriter)
Invokes the writing of the body of the message. |
void |
invokeHandlers(org.jibx.ws.context.Phase phase,
IXMLWriter xmlWriter)
Invoke the processing of the phase. |
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 |
setBodyWriter(org.jibx.ws.io.PayloadWriter bodyWriter)
Sets the writer for the body of the message. |
Methods inherited from class org.jibx.ws.context.MessageContext |
---|
getBody, getExchangeContext, setBody |
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 |
---|
public OutContext()
Method Detail |
---|
public void setBodyWriter(org.jibx.ws.io.PayloadWriter bodyWriter)
bodyWriter
- the message body writerpublic void invokeBodyWriter(IXMLWriter xmlWriter) throws IOException, WsException
xmlWriter
- the writer to write the body to
IOException
- on any I/O error
WsException
- on errors other than I/O, for example invalid XML formatpublic void addHandler(org.jibx.ws.context.Phase phase, OutHandler handler)
phase
- the phase to add the handler tohandler
- the handler to addpublic boolean hasHandlers(org.jibx.ws.context.Phase phase)
phase
- the phase
true
if the specified phase has 1 or more handlers, false
otherwisepublic void invokeHandlers(org.jibx.ws.context.Phase phase, IXMLWriter xmlWriter) throws IOException, WsException
phase
- the phase to invoke the handlers forxmlWriter
- the writer to write XML content to
IOException
- on any I/O error
WsException
- on errors other than I/O, for example invalid XML formatpublic boolean isOutbound()
isOutbound
in class MessageContext
true
if the context is for an outbound message, false
for inbound.public void reset()
reset
in class MessageContext
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |