| java.lang.Object org.apache.axis2.engine.Phase
All known Subclasses: org.apache.axis2.engine.DispatchPhase,
Phase | public class Phase implements Handler(Code) | | A Phase is an ordered collection of Handlers.
|
Phase | public Phase()(Code) | | Default constructor
|
Phase | public Phase(String phaseName)(Code) | | Create a named Phase
Parameters: phaseName - the name for this Phase |
addHandler | public void addHandler(Handler handler)(Code) | | Add a handler to the Phase.
Parameters: handler - the Handler to add |
addHandler | public void addHandler(Handler handler, int index)(Code) | | Add a Handler at a particular index within the Phase.
If we have a Phase with (H1, H2), calling addHandler(H3, 1) will result in (H1, H3, H2)
Parameters: handler - the Handler to add Parameters: index - the position in the Phase at which to place the Handler |
checkPostConditions | public void checkPostConditions(MessageContext msgContext) throws AxisFault(Code) | | Confirm that all post-conditions of this Phase are met. After all Handlers in a
Phase are invoke()d, this method will be called. Subclasses should override it in order
to confirm that the purpose of the given Phase has been acheived.
Parameters: msgContext - the active MessageContext throws: AxisFault - if a post-condition has not been met, or other problems occur |
checkPreconditions | public void checkPreconditions(MessageContext msgContext) throws AxisFault(Code) | | Check the preconditions for a Phase. This method will be called when the Phase is
invoked, BEFORE any Handlers are invoked. Subclasses should override it in order
to confirm that necessary preconditions are met before the Phase does its work. They
should throw an appropriate AxisFault if not.
Parameters: msgContext - the active MessageContext throws: AxisFault - if a precondition is not met, or in case of other problem |
cleanup | public void cleanup()(Code) | | |
getHandlerCount | public int getHandlerCount()(Code) | | |
getHandlers | public ArrayList getHandlers()(Code) | | Gets all the handlers in the phase.
Returns an ArrayList of Handlers |
getPhaseName | public String getPhaseName()(Code) | | Returns the name. |
invoke | final public InvocationResponse invoke(MessageContext msgctx) throws AxisFault(Code) | | Invoke all the handlers in this Phase
Parameters: msgctx - the current MessageContext An InvocationResponse that indicates whatthe next step in the message processing should be. throws: org.apache.axis2.AxisFault - |
removeHandler | public void removeHandler(HandlerDescription handlerDesc)(Code) | | Remove a given Handler from a phase using a HandlerDescription
Parameters: handlerDesc - the HandlerDescription to remove |
setPhaseFirst | public void setPhaseFirst(Handler handler) throws PhaseException(Code) | | Add a Handler to the Phase in the very first position, and ensure no other Handler
will come before it.
Parameters: handler - the Handler to add throws: PhaseException - if another Handler is already set as phaseFirst |
setPhaseLast | public void setPhaseLast(Handler handler) throws PhaseException(Code) | | Add a Handler to the Phase in the very last position, and ensure no other Handler
will come after it.
Parameters: handler - the Handler to add throws: PhaseException - if another Handler is already set as phaseLast |
|
|