org.apache.axis2.engine
Interface Handler

All Known Subinterfaces:
TransportSender
All Known Implementing Classes:
AbstractHandler, CommonsHTTPTransportSender, JMSSender, LocalResponder, LocalTransportSender, MailTransportSender, Phase, TCPTransportSender

public interface Handler

Interface Handler


Nested Class Summary
static class Handler.InvocationResponse
          This type encapsulates an enumeration of possible message processing instruction values that may be returned by a handler/phase within the runtime.
 
Method Summary
 void cleanup()
          Since this might change the whole behavior of Axis2 handlers, and since this is still under discussion (http://marc.theaimsgroup.com/?l=axis-dev&m=114504084929285&w=2) implementation of this method is deferred.
 void flowComplete(MessageContext msgContext)
          This method will be called on each registered handler that had its invoke(...) method called during the processing of the message, once the message processing has completed.
 HandlerDescription getHandlerDesc()
          Gets the HandlerDescription of a handler.
 java.lang.String getName()
          Method getName.
 Parameter getParameter(java.lang.String name)
          Method getParameter.
 void init(HandlerDescription handlerdesc)
          Method init.
 Handler.InvocationResponse invoke(MessageContext msgContext)
          This method will be called on each registered handler when a message needs to be processed.
 

Method Detail

cleanup

public void cleanup()
Since this might change the whole behavior of Axis2 handlers, and since this is still under discussion (http://marc.theaimsgroup.com/?l=axis-dev&m=114504084929285&w=2) implementation of this method is deferred. Note : This method will not be automatically called, from Axis2 engine, until this is fully implemented.


init

public void init(HandlerDescription handlerdesc)
Method init.

Parameters:
handlerdesc -

invoke

public Handler.InvocationResponse invoke(MessageContext msgContext)
                                  throws AxisFault
This method will be called on each registered handler when a message needs to be processed. If the message processing is paused by the handler, then this method will be called again for the handler that paused the processing once it is resumed.

This method may be called concurrently from multiple threads.

Handlers that want to determine the type of message that is to be processed (e.g. response vs request, inbound vs. outbound, etc.) can retrieve that information from the MessageContext via MessageContext.getFLOW() and MessageContext.getAxisOperation().getMessageExchangePattern() APIs.

Parameters:
msgContext - the MessageContext to process with this Handler.
Returns:
An InvocationResponse that indicates what the next step in the message processing should be.
Throws:
AxisFault - if the handler encounters an error

flowComplete

public void flowComplete(MessageContext msgContext)
This method will be called on each registered handler that had its invoke(...) method called during the processing of the message, once the message processing has completed. During execution of the flowComplete's, handlers are invoked in the opposite order that they were invoked originally.

Parameters:
msgContext - the MessageContext to process with this Handler.

getHandlerDesc

public HandlerDescription getHandlerDesc()
Gets the HandlerDescription of a handler. This is used as an input to get phaseRule of a handler.

Returns:
Returns HandlerDescription.

getName

public java.lang.String getName()
Method getName.

Returns:
Returns String

getParameter

public Parameter getParameter(java.lang.String name)
Method getParameter.

Parameters:
name -
Returns:
Returns Parameter.


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.