org.apache.axis
Interface Handler

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
Chain, TargetedChain
All Known Implementing Classes:
BasicHandler

public interface Handler
extends java.io.Serializable

Author:
Doug Davis (dug@us.ibm.com)

Method Summary
 void addOption(java.lang.String name, java.lang.Object value)
          Deprecated. replaced by setOption, to be more consistent
 boolean canHandleBlock(QName qname)
          Can this Handler process this QName?
 void cleanup()
          Cleanup is called when the chain containing this Handler object is done processing the chain.
 void generateWSDL(MessageContext msgContext)
          Obtain WSDL information.
 org.w3c.dom.Element getDeploymentData(org.w3c.dom.Document doc)
          This will return the root element of an XML doc that describes the deployment information about this handler.
 java.lang.String getName()
          Return the name (i.e.
 java.lang.Object getOption(java.lang.String name)
          Returns the option corresponding to the 'name' given
 java.util.Hashtable getOptions()
          Return the entire list of options
 void init()
          Init is called when the chain containing this Handler object is instantiated.
 void invoke(MessageContext msgContext)
          Invoke is called to do the actual work of the Handler object.
 void setName(java.lang.String name)
          Set the name (i.e.
 void setOption(java.lang.String name, java.lang.Object value)
          Add the given option (name/value) to this handler's bag of options
 void setOptions(java.util.Hashtable opts)
          Sets a whole list of options
 void undo(MessageContext msgContext)
          Called when a fault occurs to 'undo' whatever 'invoke' did.
 

Method Detail

init

public void init()
Init is called when the chain containing this Handler object is instantiated.

cleanup

public void cleanup()
Cleanup is called when the chain containing this Handler object is done processing the chain.

invoke

public void invoke(MessageContext msgContext)
            throws AxisFault
Invoke is called to do the actual work of the Handler object. If there is a fault during the processing of this method it is invoke's job to catch the exception and undo any partial work that has been completed. Once we leave 'invoke' if a fault is thrown, this classes 'undo' method will be called to undo the work that 'invoke' did. Invoke should rethrow any exceptions it catches.

undo

public void undo(MessageContext msgContext)
Called when a fault occurs to 'undo' whatever 'invoke' did.

canHandleBlock

public boolean canHandleBlock(QName qname)
Can this Handler process this QName?

setOption

public void setOption(java.lang.String name,
                      java.lang.Object value)
Add the given option (name/value) to this handler's bag of options

addOption

public void addOption(java.lang.String name,
                      java.lang.Object value)
Deprecated. replaced by setOption, to be more consistent

Old version of setOption()

getOption

public java.lang.Object getOption(java.lang.String name)
Returns the option corresponding to the 'name' given

setName

public void setName(java.lang.String name)
Set the name (i.e. registry key) of this Handler

getName

public java.lang.String getName()
Return the name (i.e. registry key) for this Handler

getOptions

public java.util.Hashtable getOptions()
Return the entire list of options

setOptions

public void setOptions(java.util.Hashtable opts)
Sets a whole list of options

getDeploymentData

public org.w3c.dom.Element getDeploymentData(org.w3c.dom.Document doc)
This will return the root element of an XML doc that describes the deployment information about this handler. This is NOT the WSDL, this is all of the static internal data use by Axis - WSDL takes into account run-time information (like which service we're talking about) this is just the data that's stored in the registry. Used by the 'list' Admin function.

generateWSDL

public void generateWSDL(MessageContext msgContext)
                  throws AxisFault
Obtain WSDL information. Some Handlers will implement this by merely setting properties in the MessageContext, others (providers) will take responsibility for doing the "real work" of generating WSDL for a given service.


Copyright © 2001 Apache XML Project. All Rights Reserved.