Package javax.xml.rpc.handler
Class GenericHandler
- java.lang.Object
-
- javax.xml.rpc.handler.GenericHandler
-
- All Implemented Interfaces:
Handler
public abstract class GenericHandler extends java.lang.Object implements Handler
Thejavax.xml.rpc.handler.GenericHandlerclass implements theHandlerinterface. SOAP Message Handler developers should typically subclassGenericHandlerclass unless the Handler class needs another class as a superclass.The
GenericHandlerclass is a convenience abstract class that makes writing Handlers easy. This class provides default implementations of the lifecycle methodsinitanddestroyand also different handle methods. A Handler developer should only override methods that it needs to specialize as part of the derivedHandlerimplementation class.- Version:
- 1.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenericHandler()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroy()Thedestroymethod indicates the end of lifecycle for a Handler instance.abstract QName[]getHeaders()Gets the header blocks processed by this Handler instance.booleanhandleFault(MessageContext context)ThehandleFaultmethod processes the SOAP faults based on the SOAP message processing model.booleanhandleRequest(MessageContext context)ThehandleRequestmethod processes the request SOAP message.booleanhandleResponse(MessageContext context)ThehandleResponsemethod processes the response message.voidinit(HandlerInfo config)Theinitmethod to enable the Handler instance to initialize itself.
-
-
-
Method Detail
-
handleRequest
public boolean handleRequest(MessageContext context)
ThehandleRequestmethod processes the request SOAP message. The default implementation of this method returnstrue. This indicates that the handler chain should continue processing of the request SOAP message. This method should be overridden if the derived Handler class needs to specialize implementation of this method.- Specified by:
handleRequestin interfaceHandler- Parameters:
context- the message context- Returns:
- true/false
-
handleResponse
public boolean handleResponse(MessageContext context)
ThehandleResponsemethod processes the response message. The default implementation of this method returnstrue. This indicates that the handler chain should continue processing of the response SOAP message. This method should be overridden if the derived Handler class needs to specialize implementation of this method.- Specified by:
handleResponsein interfaceHandler- Parameters:
context- the message context- Returns:
- true/false
-
handleFault
public boolean handleFault(MessageContext context)
ThehandleFaultmethod processes the SOAP faults based on the SOAP message processing model. The default implementation of this method returnstrue. This indicates that the handler chain should continue processing of the SOAP fault. This method should be overridden if the derived Handler class needs to specialize implementation of this method.- Specified by:
handleFaultin interfaceHandler- Parameters:
context- the message context- Returns:
- true/false
-
init
public void init(HandlerInfo config)
Theinitmethod to enable the Handler instance to initialize itself. This method should be overridden if the derived Handler class needs to specialize implementation of this method.
-
destroy
public void destroy()
Thedestroymethod indicates the end of lifecycle for a Handler instance. This method should be overridden if the derived Handler class needs to specialize implementation of this method.
-
getHeaders
public abstract QName[] getHeaders()
Gets the header blocks processed by this Handler instance.- Specified by:
getHeadersin interfaceHandler- Returns:
- Array of QNames of header blocks processed by this handler instance.
QNameis the qualified name of the outermost element of the Header block.
-
-