public class Phase extends Object implements Handler
Handler.InvocationResponse
Modifier and Type | Field and Description |
---|---|
static String |
ALL_PHASES |
Constructor and Description |
---|
Phase()
Default constructor
|
Phase(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.
|
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() |
public static final String ALL_PHASES
public Phase()
public Phase(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)
Handler
public final Handler.InvocationResponse invoke(MessageContext msgctx) throws AxisFault
public void flowComplete(MessageContext msgContext)
Handler
flowComplete
in interface Handler
msgContext
- the MessageContext
to process with this
Handler
.public int getHandlerCount()
public HandlerDescription getHandlerDesc()
Handler
getHandlerDesc
in interface Handler
public List<Handler> getHandlers()
public String getName()
Handler
public Parameter getParameter(String name)
Handler
getParameter
in interface Handler
name
- the name of the desired valuepublic String getPhaseName()
public void setName(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–2013 The Apache Software Foundation. All rights reserved.