|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.engine.Phase
public class Phase
A Phase is an ordered collection of Handlers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler |
---|
Handler.InvocationResponse |
Field Summary | |
---|---|
static String |
ALL_PHASES
|
Constructor Summary | |
---|---|
Phase()
Default constructor |
|
Phase(String phaseName)
Create a named Phase |
Method Summary | |
---|---|
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. |
List<Handler> |
getHandlers()
Gets all the handlers in the phase. |
String |
getName()
Return the name of this Handler |
Parameter |
getParameter(String name)
Get a Parameter from this Handler |
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(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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String ALL_PHASES
Constructor Detail |
---|
public Phase()
public Phase(String phaseName)
phaseName
- the name for this PhaseMethod Detail |
---|
public void addHandler(Handler handler)
handler
- the Handler to addpublic void addHandler(HandlerDescription handlerDesc) throws PhaseException
handlerDesc
- the HandlerDescription to add
PhaseException
- 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 MessageContext
AxisFault
- if a post-condition has not been met, or other problems occurpublic void checkPreconditions(MessageContext msgContext) throws AxisFault
msgContext
- the active MessageContext
AxisFault
- if a precondition is not met, or in case of other problempublic void cleanup()
cleanup
in interface Handler
public void init(HandlerDescription handlerdesc)
Handler
init
in interface Handler
handlerdesc
- the HandlerDescription for this Handlerpublic final Handler.InvocationResponse invoke(MessageContext msgctx) throws AxisFault
invoke
in interface Handler
msgctx
- the current MessageContext
AxisFault
public void flowComplete(MessageContext msgContext)
Handler
flowComplete
in interface Handler
msgContext
- the MessageContext
to process with this
Handler
.public String toString()
toString
in class Object
public int getHandlerCount()
public HandlerDescription getHandlerDesc()
Handler
getHandlerDesc
in interface Handler
public List<Handler> getHandlers()
public String getName()
Handler
getName
in interface Handler
public Parameter getParameter(String name)
Handler
getParameter
in interface Handler
name
- the name of the desired value
public String getPhaseName()
public void setName(String phaseName)
public void setPhaseFirst(Handler handler) throws PhaseException
handler
- the Handler to add
PhaseException
- if another Handler is already set as phaseFirstpublic void setPhaseLast(Handler handler) throws PhaseException
handler
- the Handler to add
PhaseException
- if another Handler is already set as phaseLastpublic void removeHandler(HandlerDescription handlerDesc)
handlerDesc
- the HandlerDescription to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |