|
||||||
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.InContext
public final class InContext
The context for the processing of an inbound message. The context provides access to the handler
objects 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 | |
---|---|
InContext()
|
Method Summary | |
---|---|
void |
addHandler(org.jibx.ws.context.Phase phase,
InHandler handler)
Adds a handler to the specified phase of the inbound message handling. |
boolean |
hasHandlers(org.jibx.ws.context.Phase phase)
Returns whether the specified phase has any handlers. |
void |
invokeBodyReader(IXMLReader xmlReader)
Invokes the reader for the body of the message and stores the body for subsequent retrieval with MessageContext.getBody() . |
Object |
invokeInHandlers(org.jibx.ws.context.Phase phase,
IXMLReader xmlReader)
Sequentially invoke the processing of the inbound handlers for a phase, until one of the handlers is successful. |
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 |
setBodyReader(org.jibx.ws.io.PayloadReader bodyReader)
Sets the reader 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 InContext()
Method Detail |
---|
public void setBodyReader(org.jibx.ws.io.PayloadReader bodyReader)
bodyReader
- the reader for the message bodypublic void invokeBodyReader(IXMLReader xmlReader) throws IOException, WsException
MessageContext.getBody()
.
xmlReader
- the reader to read XML content from
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, InHandler 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 Object invokeInHandlers(org.jibx.ws.context.Phase phase, IXMLReader xmlReader) throws IOException, WsException
phase
- the phase to invoke the handlers forxmlReader
- the reader to read XML content from
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 |