站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jaxrpc API Documentation 英文版文档

Handler (JAXRPC API) - JBoss 4.0.1 sp1 jaxrpc API Documentation 英文版文档


org.apache.axis
Interface Handler

All Superinterfaces:
Serializable
All Known Subinterfaces:
Chain, TargetedChain
All Known Implementing Classes:
BasicHandler, SimpleChain, SimpleTargetedChain

public interface Handler
extends Serializable

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

Method Summary
 boolean canHandleBlock(javax.xml.namespace.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.
 Element getDeploymentData(Document doc)
          This will return the root element of an XML doc that describes the deployment information about this handler.
 String getName()
          Return the name (i.e.
 Object getOption(String name)
          Returns the option corresponding to the 'name' given
 Hashtable getOptions()
          Return the entire list of options
 List getUnderstoodHeaders()
          Return a list of QNames which this Handler understands.
 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 onFault(MessageContext msgContext)
          Called when a subsequent handler throws a fault.
 void setName(String name)
          Set the name (i.e.
 void setOption(String name, Object value)
          Add the given option (name/value) to this handler's bag of options
 void setOptions(Hashtable opts)
          Sets a whole list of options
 

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

Throws:
AxisFault

onFault

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


canHandleBlock

public boolean canHandleBlock(javax.xml.namespace.QName qname)
Can this Handler process this QName?


getUnderstoodHeaders

public List getUnderstoodHeaders()
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.


setOption

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


getOption

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


setName

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


getName

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


getOptions

public Hashtable getOptions()
Return the entire list of options


setOptions

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


getDeploymentData

public Element getDeploymentData(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.

Throws:
AxisFault


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.