org.apache.axis

Class FaultableHandler

public class FaultableHandler extends BasicHandler

A FaultableHandler is 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)

Field Summary
protected static LogentLog
The Log used for enterprise-centric logging.
protected static Loglog
The Log used to log all events that would be of general interest.
protected HandlerworkHandler
The Handler that will do the actual work of handeling the fault.
Constructor Summary
FaultableHandler(Handler workHandler)
Create a new FaultHandler.
Method Summary
booleancanHandleBlock(QName qname)
voidcleanup()
voidinit()
voidinvoke(MessageContext msgContext)
Invokes the specified handler.
voidonFault(MessageContext msgContext)
Some handler later on has faulted so we need to process the fault.

Field Detail

entLog

protected static Log entLog
The Log used 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.

log

protected static Log log
The Log used to log all events that would be of general interest.

workHandler

protected Handler workHandler
The Handler that 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

canHandleBlock

public boolean canHandleBlock(QName qname)

cleanup

public void cleanup()

init

public void init()

invoke

public void invoke(MessageContext msgContext)
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 the MessageContext to 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.

Parameters: msgContext the context to process

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.