Package org.apache.axis2.handlers
Class AbstractTemplatedHandler
java.lang.Object
org.apache.axis2.handlers.AbstractHandler
org.apache.axis2.handlers.AbstractTemplatedHandler
- All Implemented Interfaces:
Handler
This abstract class differentiates the concern of the conditional check to see whether this
particular message needs to be handled by the handler implementation and the actual invocation
logic.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler
Handler.InvocationResponse -
Field Summary
Fields inherited from class org.apache.axis2.handlers.AbstractHandler
handlerDesc -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Handler.InvocationResponsedoInvoke(MessageContext msgCtx) This should implement the actual handler invocation logic.invoke(MessageContext msgContext) Implements the separation of the conditional check and the actual logicabstract booleanshouldInvoke(MessageContext msgCtx) This method should implement the conditional check of the handler to decide whether this particular message needs to be handled by meMethods inherited from class org.apache.axis2.handlers.AbstractHandler
flowComplete, getHandlerDesc, getName, getParameter, init, toString
-
Constructor Details
-
AbstractTemplatedHandler
public AbstractTemplatedHandler()
-
-
Method Details
-
invoke
Implements the separation of the conditional check and the actual logic- Parameters:
msgContext- theMessageContextto process with thisHandler.- Returns:
- CONTINUE if the handler implementation says 'should not be invoked'
or the result of the
doInvoke(org.apache.axis2.context.MessageContext) - Throws:
AxisFault- if thedoInvoke(org.apache.axis2.context.MessageContext)throws the same
-
shouldInvoke
This method should implement the conditional check of the handler to decide whether this particular message needs to be handled by me- Parameters:
msgCtx- currentMessageContextto be evaluated- Returns:
- boolean
true, if this handler needs to be further invoked,falseif this handler has nothing to do with this specific message and want the flow to be continued - Throws:
AxisFault- in an error in evaluating the decision
-
doInvoke
This should implement the actual handler invocation logic.- Parameters:
msgCtx- current message to be handled by this handler- Returns:
- flow completion decision, should be one of
Handler.InvocationResponse.CONTINUE,Handler.InvocationResponse.ABORT,Handler.InvocationResponse.SUSPEND - Throws:
AxisFault- in an error in invoking the handler
-