org.apache.axis2.engine
Class Phase

java.lang.Object
  extended byorg.apache.axis2.engine.Phase
All Implemented Interfaces:
Handler, Serializable
Direct Known Subclasses:
DispatchPhase

public class Phase
extends Object
implements Handler

A Phase is an ordered collection of Handlers.

See Also:
Serialized Form

Constructor Summary
Phase()
           
Phase(String phaseName)
          Constructor Phase.
 
Method Summary
 void addHandler(Handler handler)
          Adds handler to the collection.
 void addHandler(HandlerDescription handler)
          Method addHandler.
 void addHandler(Handler handler, int index)
          Method addHandler.
 void checkPostConditions(MessageContext msgContext)
           
 void checkPreconditions(MessageContext msgContext)
           
 void cleanup()
          Method cleanup.
 int getHandlerCount()
           
 HandlerDescription getHandlerDesc()
          Gets the HandlerDescription of a handler.
 ArrayList getHandlers()
          Gets all the handlers in the phase.
 QName getName()
          Method getName.
 Parameter getParameter(String name)
          Method getParameter.
 String getPhaseName()
           
 void init(HandlerDescription handlerdesc)
          Method init.
 void invoke(MessageContext msgctx)
          invokes all the handlers in this Phase
 void setName(String phaseName)
           
 void setPhaseFirst(Handler phaseFirst)
          Method setPhaseFirst.
 void setPhaseLast(Handler phaseLast)
          Method setPhaseLast.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Phase

public Phase()

Phase

public Phase(String phaseName)
Constructor Phase.

Parameters:
phaseName -
Method Detail

addHandler

public void addHandler(Handler handler)
Adds handler to the collection.

Parameters:
handler -

addHandler

public void addHandler(HandlerDescription handler)
                throws PhaseException
Method addHandler.

Parameters:
handler -
Throws:
PhaseException

addHandler

public void addHandler(Handler handler,
                       int index)
Method addHandler.

Parameters:
handler -
index -

checkPostConditions

public void checkPostConditions(MessageContext msgContext)
                         throws AxisFault
Throws:
AxisFault

checkPreconditions

public void checkPreconditions(MessageContext msgContext)
                        throws AxisFault
Throws:
AxisFault

cleanup

public void cleanup()
             throws AxisFault
Description copied from interface: Handler
Method cleanup.

Specified by:
cleanup in interface Handler
Throws:
AxisFault

init

public void init(HandlerDescription handlerdesc)
Description copied from interface: Handler
Method init.

Specified by:
init in interface Handler
Parameters:
handlerdesc -

invoke

public final void invoke(MessageContext msgctx)
                  throws AxisFault
invokes all the handlers in this Phase

Specified by:
invoke in interface Handler
Parameters:
msgctx -
Throws:
AxisFault

toString

public String toString()

getHandlerCount

public int getHandlerCount()

getHandlerDesc

public HandlerDescription getHandlerDesc()
Description copied from interface: Handler
Gets the HandlerDescription of a handler. This is used as an input to get phaseRule of a handler.

Specified by:
getHandlerDesc in interface Handler
Returns:
Returns HandlerDescription.

getHandlers

public ArrayList getHandlers()
Gets all the handlers in the phase.

Returns:
Returns an ArrayList of Handlers

getName

public QName getName()
Description copied from interface: Handler
Method getName.

Specified by:
getName in interface Handler
Returns:
Returns QName

getParameter

public Parameter getParameter(String name)
Description copied from interface: Handler
Method getParameter.

Specified by:
getParameter in interface Handler
Parameters:
name -
Returns:
Returns Parameter.

getPhaseName

public String getPhaseName()
Returns:
Returns the name.

setName

public void setName(String phaseName)

setPhaseFirst

public void setPhaseFirst(Handler phaseFirst)
                   throws PhaseException
Method setPhaseFirst.

Parameters:
phaseFirst -
Throws:
PhaseException

setPhaseLast

public void setPhaseLast(Handler phaseLast)
                  throws PhaseException
Method setPhaseLast.

Parameters:
phaseLast -
Throws:
PhaseException