Package org.apache.axis
Class FaultableHandler
- java.lang.Object
-
- org.apache.axis.handlers.BasicHandler
-
- org.apache.axis.FaultableHandler
-
- All Implemented Interfaces:
java.io.Serializable,Handler
public class FaultableHandler extends BasicHandler
AFaultableHandleris essentially a wrapper for any other Handler which provides flexible fault handling semantics.- Author:
- Doug Davis (dug@us.ibm.com), Glen Daniels (gdaniels@apache.org)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.LogentLogTheLogused for enterprise-centric logging.protected static org.apache.commons.logging.LoglogTheLogused to log all events that would be of general interest.protected HandlerworkHandlerTheHandlerthat will do the actual work of handeling the fault.-
Fields inherited from class org.apache.axis.handlers.BasicHandler
makeLockable, name, options
-
-
Constructor Summary
Constructors Constructor Description FaultableHandler(Handler workHandler)Create a new FaultHandler.
-
Method Summary
All Methods Instance Methods Concrete 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.voidinit()Stubbed-out methods.voidinvoke(MessageContext msgContext)Invokes the specified handler.voidonFault(MessageContext msgContext)Some handler later on has faulted so we need to process the fault.-
Methods inherited from class org.apache.axis.handlers.BasicHandler
generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, initHashtable, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
-
-
-
-
Field Detail
-
log
protected static org.apache.commons.logging.Log log
TheLogused to log all events that would be of general interest.
-
entLog
protected static org.apache.commons.logging.Log entLog
TheLogused for enterprise-centric logging. The enterprise category is for stuff that an enterprise product might want to track, but in a simple environment (like the AXIS build) would be nothing more than a nuisance.
-
workHandler
protected Handler workHandler
TheHandlerthat will do the actual work of handeling the fault.
-
-
Constructor Detail
-
FaultableHandler
public FaultableHandler(Handler workHandler)
Create a new FaultHandler.- Parameters:
workHandler- the Handler we're going to wrap with Fault semantics.
-
-
Method Detail
-
init
public void init()
Description copied from class:BasicHandlerStubbed-out methods. Override in your child class to implement any real behavior. Note that there is NOT a stub for invoke(), since we require any Handler derivative to implement that.- Specified by:
initin interfaceHandler- Overrides:
initin classBasicHandler
-
cleanup
public void cleanup()
Description copied from interface:HandlerCleanup is called when the chain containing this Handler object is done processing the chain.- Specified by:
cleanupin interfaceHandler- Overrides:
cleanupin classBasicHandler
-
invoke
public void invoke(MessageContext msgContext) throws AxisFault
Invokes the specified handler. If there's a fault the appropriate key will be calculated and used to find the fault chain to be invoked. This assumes that the workHandler has caught the exception and already done its fault processing - as needed.- Parameters:
msgContext- theMessageContextto process- Throws:
AxisFault- if anything goes terminally wrong
-
onFault
public void onFault(MessageContext msgContext)
Some handler later on has faulted so we need to process the fault.- Specified by:
onFaultin interfaceHandler- Overrides:
onFaultin classBasicHandler- Parameters:
msgContext- the context to process
-
canHandleBlock
public boolean canHandleBlock(QName qname)
Description copied from interface:HandlerIndicate if this handler can processqname.- Specified by:
canHandleBlockin interfaceHandler- Overrides:
canHandleBlockin classBasicHandler- Parameters:
qname- theQNameto check- Returns:
- true if this
Handlercan handleqname, false otherwise
-
-