Package org.apache.axis
Interface Handler
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
Chain,TargetedChain
- All Known Implementing Classes:
AxisClient,AxisEngine,AxisServer,BasicHandler,BasicProvider,BSFProvider,CommonsHTTPSender,ComProvider,CORBAProvider,DebugHandler,EchoHandler,EJBProvider,ErrorHandler,FaultableHandler,HTTPActionHandler,HTTPAuthHandler,HTTPSender,JavaProvider,JavaSender,JAXRPCHandler,JMSSender,JWSHandler,LocalResponder,LocalSender,LogHandler,LogMessage,MailSender,MD5AttachHandler,MsgProvider,MustUnderstandChecker,RMIProvider,RPCProvider,SimpleAuthenticationHandler,SimpleAuthorizationHandler,SimpleChain,SimpleSessionHandler,SimpleTargetedChain,SOAPMonitorHandler,SOAPService,Transport,URLMapper
public interface Handler extends java.io.SerializableAn AXIS handler.- Author:
- Doug Davis (dug@us.ibm.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanHandleBlock(QName qname)Indicate if this handler can processqname.voidcleanup()Cleanup is called when the chain containing this Handler object is done processing the chain.voidgenerateWSDL(MessageContext msgContext)Obtain WSDL information.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.java.lang.StringgetName()Return the name (i.e.java.lang.ObjectgetOption(java.lang.String name)Returns the option corresponding to the 'name' given.java.util.HashtablegetOptions()Return the entire list of options.java.util.ListgetUnderstoodHeaders()Return a list of QNames which this Handler understands.voidinit()Init is called when the chain containing this Handler object is instantiated.voidinvoke(MessageContext msgContext)Invoke is called to do the actual work of the Handler object.voidonFault(MessageContext msgContext)Called when a subsequent handler throws a fault.voidsetName(java.lang.String name)Set the name (i.e.voidsetOption(java.lang.String name, java.lang.Object value)Add the given option (name/value) to this handler's bag of options.voidsetOptions(java.util.Hashtable opts)Sets a whole list of options.
-
-
-
Method Detail
-
init
void init()
Init is called when the chain containing this Handler object is instantiated.
-
cleanup
void cleanup()
Cleanup is called when the chain containing this Handler object is done processing the chain.
-
invoke
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.- Parameters:
msgContext- theMessageContextto process with thisHandler.- Throws:
AxisFault- if the handler encounters an error
-
onFault
void onFault(MessageContext msgContext)
Called when a subsequent handler throws a fault.- Parameters:
msgContext- theMessageContextto process the fault to
-
canHandleBlock
boolean canHandleBlock(QName qname)
Indicate if this handler can processqname.- Parameters:
qname- theQNameto check- Returns:
- true if this
Handlercan handleqname, false otherwise
-
getUnderstoodHeaders
java.util.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.- Returns:
- a List of
QNameinstances
-
setOption
void setOption(java.lang.String name, java.lang.Object value)Add the given option (name/value) to this handler's bag of options.- Parameters:
name- the name of the optionvalue- the new value of the option
-
getOption
java.lang.Object getOption(java.lang.String name)
Returns the option corresponding to the 'name' given.- Parameters:
name- the name of the option- Returns:
- the value of the option
-
setName
void setName(java.lang.String name)
Set the name (i.e. registry key) of this Handler.- Parameters:
name- the new name
-
getName
java.lang.String getName()
Return the name (i.e. registry key) for thisHandler.- Returns:
- the name for this
Handler
-
getOptions
java.util.Hashtable getOptions()
Return the entire list of options.- Returns:
- a
Hashsetcontaining all name/value pairs
-
setOptions
void setOptions(java.util.Hashtable opts)
Sets a whole list of options.- Parameters:
opts- aHashtableof name-value pairs to use
-
getDeploymentData
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.- Parameters:
doc- aDocumentwithin which to build the deployment data- Returns:
- an Element representing the deployment data
-
generateWSDL
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.- Parameters:
msgContext- theMessageContextto generate the WSDL to- Throws:
AxisFault- if there was a problem generating the WSDL
-
-