Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.handlers
Class AbstractTemplatedHandler

    java.lang.Object
      org.apache.axis2.handlers.AbstractHandler
          org.apache.axis2.handlers.AbstractTemplatedHandler

All Implemented Interfaces:
  Handler

    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`

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
`AbstractTemplatedHandler()`

Method Summary
`abstract Handler.InvocationResponse` | `doInvoke(MessageContext msgCtx)` This should implement the actual handler invocation logic.
`Handler.InvocationResponse` | `invoke(MessageContext msgContext)` Implements the separation of the conditional check and the actual logic
`abstract boolean` | `shouldInvoke(MessageContext msgCtx)` This method should implement the conditional check of the handler to decide whether this particular message needs to be handled by me

Methods inherited from class org.apache.axis2.handlers.AbstractHandler
`cleanup, flowComplete, getHandlerDesc, getName, getParameter, init, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AbstractTemplatedHandler

    public AbstractTemplatedHandler()

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.