org.apache.axis2.handlers
Class AbstractTemplatedHandler
java.lang.Object
org.apache.axis2.handlers.AbstractHandler
org.apache.axis2.handlers.AbstractTemplatedHandler
- All Implemented Interfaces:
- Handler
- Direct Known Subclasses:
- AddressingInHandler, AddressingOutHandler, MustUnderstandChecker
public abstract class AbstractTemplatedHandler
- extends AbstractHandler
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:
AbstractHandler
AbstractTemplatedHandler
public AbstractTemplatedHandler()
invoke
public final Handler.InvocationResponse invoke(MessageContext msgContext)
throws AxisFault
- Implements the separation of the conditional check and the actual logic
- Parameters:
msgContext
- the MessageContext
to process with this Handler
.
- 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 the doInvoke(org.apache.axis2.context.MessageContext)
throws the same
shouldInvoke
public abstract boolean shouldInvoke(MessageContext msgCtx)
throws AxisFault
- This method should implement the conditional check of the handler to decide whether this
particular message needs to be handled by me
- Parameters:
msgCtx
- current MessageContext
to be evaluated
- Returns:
- boolean
true, if this handler needs to be further invoked,
false
if 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
public abstract Handler.InvocationResponse doInvoke(MessageContext msgCtx)
throws AxisFault
- 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
InvocationResponse#CONTINUE
,
InvocationResponse#ABORT
, InvocationResponse#SUSPEND
- Throws:
AxisFault
- in an error in invoking the handler
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.