FileDocCategorySizeDatePackage
Handler.javaAPI DocApache Axis 1.45880Sat Apr 22 18:57:28 BST 2006org.apache.axis

Handler

public interface Handler implements Serializable
An AXIS handler.
author
Doug Davis (dug@us.ibm.com)

Fields Summary
Constructors Summary
Methods Summary
public booleancanHandleBlock(javax.xml.namespace.QName qname)
Indicate if this handler can process qname.

param
qname the QName to check
return
true if this Handler can handle qname, false otherwise

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

public voidgenerateWSDL(MessageContext msgContext)
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.

param
msgContext the MessageContext to generate the WSDL to
throws
AxisFault if there was a problem generating the WSDL

public org.w3c.dom.ElementgetDeploymentData(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.

param
doc a Document within which to build the deployment data
return
an Element representing the deployment data

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

return
the name for this Handler

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

param
name the name of the option
return
the value of the option

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

return
a Hashset containing all name/value pairs

public java.util.ListgetUnderstoodHeaders()
Return a list of QNames which this Handler understands. By returning a particular QName here, we are committing to fulfilling any contracts defined in the specification of the SOAP header with that QName.

return
a List of QName instances

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

public voidinvoke(MessageContext msgContext)
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 'onFault' method will be called. Invoke should rethrow any exceptions it catches, wrapped in an AxisFault.

param
msgContext the MessageContext to process with this Handler.
throws
AxisFault if the handler encounters an error

public voidonFault(MessageContext msgContext)
Called when a subsequent handler throws a fault.

param
msgContext the MessageContext to process the fault to

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

param
name the new name

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

param
name the name of the option
param
value the new value of the option

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

param
opts a Hashtable of name-value pairs to use