public class Phase extends java.lang.Object implements Handler
Handler.InvocationResponse| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL_PHASES |
| Constructor and Description |
|---|
Phase()
Default constructor
|
Phase(java.lang.String phaseName)
Create a named Phase
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(Handler handler)
Add a handler to the Phase.
|
void |
addHandler(HandlerDescription handlerDesc)
Add a HandlerDescription to the Phase
|
void |
addHandler(Handler handler,
int index)
Add a Handler at a particular index within the Phase.
|
void |
checkPostConditions(MessageContext msgContext)
Confirm that all post-conditions of this Phase are met.
|
void |
checkPreconditions(MessageContext msgContext)
Check the preconditions for a Phase.
|
void |
cleanup() |
void |
flowComplete(MessageContext msgContext)
This method will be called on each registered handler that had its
invoke(...) method called during the processing of the message, once
the message processing has completed.
|
int |
getHandlerCount() |
HandlerDescription |
getHandlerDesc()
Gets the HandlerDescription of a handler.
|
java.util.List<Handler> |
getHandlers()
Gets all the handlers in the phase.
|
java.lang.String |
getName()
Return the name of this Handler
|
Parameter |
getParameter(java.lang.String name)
Get a Parameter from this Handler
|
java.lang.String |
getPhaseName() |
void |
init(HandlerDescription handlerdesc)
Initialize a Handler.
|
Handler.InvocationResponse |
invoke(MessageContext msgctx)
Invoke all the handlers in this Phase
|
void |
removeHandler(HandlerDescription handlerDesc)
Remove a given Handler from a phase using a HandlerDescription
|
void |
setName(java.lang.String phaseName) |
void |
setPhaseFirst(Handler handler)
Add a Handler to the Phase in the very first position, and ensure no other Handler
will come before it.
|
void |
setPhaseLast(Handler handler)
Add a Handler to the Phase in the very last position, and ensure no other Handler
will come after it.
|
java.lang.String |
toString() |
public static final java.lang.String ALL_PHASES
public Phase()
public Phase(java.lang.String phaseName)
phaseName - the name for this Phasepublic void addHandler(Handler handler)
handler - the Handler to addpublic void addHandler(HandlerDescription handlerDesc) throws PhaseException
handlerDesc - the HandlerDescription to addPhaseException - if there is a problempublic void addHandler(Handler handler, int index)
handler - the Handler to addindex - the position in the Phase at which to place the Handlerpublic void checkPostConditions(MessageContext msgContext) throws AxisFault
msgContext - the active MessageContextAxisFault - if a post-condition has not been met, or other problems occurpublic void checkPreconditions(MessageContext msgContext) throws AxisFault
msgContext - the active MessageContextAxisFault - if a precondition is not met, or in case of other problempublic void init(HandlerDescription handlerdesc)
Handlerpublic final Handler.InvocationResponse invoke(MessageContext msgctx) throws AxisFault
public void flowComplete(MessageContext msgContext)
HandlerflowComplete in interface HandlermsgContext - the MessageContext to process with this
Handler.public java.lang.String toString()
toString in class java.lang.Objectpublic int getHandlerCount()
public HandlerDescription getHandlerDesc()
HandlergetHandlerDesc in interface Handlerpublic java.util.List<Handler> getHandlers()
public java.lang.String getName()
Handlerpublic Parameter getParameter(java.lang.String name)
HandlergetParameter in interface Handlername - the name of the desired valuepublic java.lang.String getPhaseName()
public void setName(java.lang.String phaseName)
public void setPhaseFirst(Handler handler) throws PhaseException
handler - the Handler to addPhaseException - if another Handler is already set as phaseFirstpublic void setPhaseLast(Handler handler) throws PhaseException
handler - the Handler to addPhaseException - if another Handler is already set as phaseLastpublic void removeHandler(HandlerDescription handlerDesc)
handlerDesc - the HandlerDescription to removeCopyright © 2004-2018 The Apache Software Foundation. All Rights Reserved.