The concept of a phase is introduced by Axis2 and it was mainly to support the dynamic ordering of handlers to provide better extensibility, and better flexibility of the handler chain. A phase can be defined in various ways:
It can be considered as a logical collection of handlers
It can be considered as a specific time interval in the message execution
It can be considered as a bucket into which one can put his/her handler
One can consider a phase as a handler too
There is another term called flow (pipe). A flow is the message pipe where the message enters from one end of the flow and leaves from the other end of the flow. A flow or execution chain can be considered as a collection of phases. Although it has been mentioned earlier that the Axis engine will call the invoke
method of a handler. That is not totally correct. At a very high level, what the engine really does is call the invoke
method of each phase in a given flow, and then the phase will sequentially invoke all the handlers...