public class SimpleChain extends BasicHandler implements Chain
A Simple Chain initially has no Handlers. Handlers may be added until the chain is invoke()d after which Handlers may not be added (and any attempt to do so will throw an exception).
Modifier and Type | Field and Description |
---|---|
protected Vector |
handlers |
protected boolean |
invoked |
makeLockable, name, options
Constructor and Description |
---|
SimpleChain() |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(Handler handler)
Adds a handler to the end of the chain.
|
boolean |
canHandleBlock(QName qname)
Indicate if this handler can process
qname . |
void |
cleanup()
Cleanup is called when the chain containing this Handler object
is done processing the chain.
|
boolean |
contains(Handler handler)
Discover if a handler is in this chain.
|
void |
generateWSDL(MessageContext msgContext)
Iterate over the chain letting each handler have a crack at
contributing to a WSDL description.
|
Element |
getDeploymentData(Document doc)
This will return the root element of an XML doc that describes the
deployment information about this handler.
|
Handler[] |
getHandlers()
Get the list of handlers in the chain.
|
void |
init()
Stubbed-out methods.
|
void |
invoke(MessageContext msgContext)
Iterate over the chain invoking each handler.
|
void |
onFault(MessageContext msgContext)
Notify the handlers in this chain because some handler
later on has faulted - in reverse order.
|
getName, getOption, getOptions, getUnderstoodHeaders, initHashtable, setName, setOption, setOptionDefault, setOptions, setOptionsLockable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getOption, getOptions, getUnderstoodHeaders, setName, setOption, setOptions
protected Vector handlers
protected boolean invoked
public void init()
BasicHandler
init
in interface Handler
init
in class BasicHandler
public void cleanup()
Handler
cleanup
in interface Handler
cleanup
in class BasicHandler
public void invoke(MessageContext msgContext) throws AxisFault
public void generateWSDL(MessageContext msgContext) throws AxisFault
generateWSDL
in interface Handler
generateWSDL
in class BasicHandler
msgContext
- the MessageContext
to write the WSDL
out toAxisFault
- if there was a problem writing the WSDLpublic void onFault(MessageContext msgContext)
onFault
in interface Handler
onFault
in class BasicHandler
msgContext
- the context to processpublic boolean canHandleBlock(QName qname)
Handler
qname
.canHandleBlock
in interface Handler
canHandleBlock
in class BasicHandler
qname
- the QName
to checkHandler
can handle qname,
false otherwise
public void addHandler(Handler handler)
Chain
addHandler
in interface Chain
handler
- the Handler
to be addedpublic boolean contains(Handler handler)
Chain
public Handler[] getHandlers()
Chain
getHandlers
in interface Chain
Handler
s that have been addedpublic Element getDeploymentData(Document doc)
Handler
getDeploymentData
in interface Handler
getDeploymentData
in class BasicHandler
doc
- a Document
within which to build the deployment
dataCopyright © The Apache Software Foundation. All Rights Reserved.