org.apache.ws.axis.security.handler
Class WSDoAllHandler

java.lang.Object
  extended byorg.apache.ws.security.handler.WSHandler
      extended byorg.apache.ws.axis.security.handler.WSDoAllHandler
All Implemented Interfaces:
org.apache.axis.Handler, java.io.Serializable
Direct Known Subclasses:
WSDoAllReceiver, WSDoAllSender

public abstract class WSDoAllHandler
extends WSHandler
implements org.apache.axis.Handler

WSDoAllHandler is a utility class which implements simple property setting/getting behavior, and stubs out a lot of the Handler methods. Extend this class to make writing your Handlers easier, and then override what you need to.

See Also:
Serialized Form

Field Summary
protected  boolean makeLockable
           
protected  java.lang.String name
           
protected  java.util.Hashtable options
           
 
Fields inherited from class org.apache.ws.security.handler.WSHandler
cryptos, DONE, secEngine
 
Constructor Summary
WSDoAllHandler()
           
 
Method Summary
 boolean canHandleBlock(javax.xml.namespace.QName qname)
           
 void cleanup()
           
 void generateWSDL(org.apache.axis.MessageContext msgContext)
           
 org.w3c.dom.Element getDeploymentData(org.w3c.dom.Document doc)
           
 java.lang.String getName()
          Return the name (i.e.
 java.lang.Object getOption(java.lang.String name)
          Returns the option corresponding to name.
 java.util.Hashtable getOptions()
          Return the entire list of options
 java.lang.String getPassword(java.lang.Object msgContext)
           
 java.lang.Object getProperty(java.lang.Object msgContext, java.lang.String key)
           
 java.util.List getUnderstoodHeaders()
          Return a list of QNames which this Handler understands.
 void init()
          Stubbed-out methods.
protected  void initHashtable()
           
 void onFault(org.apache.axis.MessageContext msgContext)
           
 void setName(java.lang.String name)
          Set the name (i.e.
 void setOption(java.lang.String name, java.lang.Object value)
          Set the given option (name/value) in this handler's bag of options
 boolean setOptionDefault(java.lang.String name, java.lang.Object value)
          Set a default value for the given option: if the option is not already set, then set it.
 void setOptions(java.util.Hashtable opts)
           
protected  void setOptionsLockable(boolean makeLockable)
          Should this Handler use a LockableHashtable for options? Default is 'false'.
 void setPassword(java.lang.Object msgContext, java.lang.String password)
           
 void setProperty(java.lang.Object msgContext, java.lang.String key, java.lang.Object value)
           
 
Methods inherited from class org.apache.ws.security.handler.WSHandler
checkReceiverResults, checkSignatureConfirmation, decodeCustomPasswordTypes, decodeDecryptionParameter, decodeEnableSignatureConfirmation, decodeEncryptionParameter, decodeMustUnderstand, decodeSignatureParameter, decodeSignatureParameter2, decodeTimestampPrecision, decodeTimestampStrict, decodeTimeToLive, decodeUTParameter, doReceiverAction, doSenderAction, getClassLoader, getPassword, getPasswordCB, getString, getStringOption, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto, verifyTimestamp, verifyTrust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.axis.Handler
invoke
 

Field Detail

makeLockable

protected boolean makeLockable

options

protected java.util.Hashtable options

name

protected java.lang.String name
Constructor Detail

WSDoAllHandler

public WSDoAllHandler()
Method Detail

setOptionsLockable

protected void setOptionsLockable(boolean makeLockable)
Should this Handler use a LockableHashtable for options? Default is 'false'.


initHashtable

protected void initHashtable()

init

public void init()
Stubbed-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:
init in interface org.apache.axis.Handler

cleanup

public void cleanup()
Specified by:
cleanup in interface org.apache.axis.Handler

canHandleBlock

public boolean canHandleBlock(javax.xml.namespace.QName qname)
Specified by:
canHandleBlock in interface org.apache.axis.Handler

onFault

public void onFault(org.apache.axis.MessageContext msgContext)
Specified by:
onFault in interface org.apache.axis.Handler

setOption

public void setOption(java.lang.String name,
                      java.lang.Object value)
Set the given option (name/value) in this handler's bag of options

Specified by:
setOption in interface org.apache.axis.Handler

setOptionDefault

public boolean setOptionDefault(java.lang.String name,
                                java.lang.Object value)
Set a default value for the given option: if the option is not already set, then set it. if the option is already set, then do not set it.

If this is called multiple times, the first with a non-null value if 'value' will set the default, remaining calls will be ignored.

Returns true if value set (by this call), otherwise false;


getOption

public java.lang.Object getOption(java.lang.String name)
Returns the option corresponding to name.

Specified by:
getOption in interface org.apache.axis.Handler
Specified by:
getOption in class WSHandler
Parameters:
name - the non-null name of the option.
Returns:
the option on name if name exists; otherwise null.

getOptions

public java.util.Hashtable getOptions()
Return the entire list of options

Specified by:
getOptions in interface org.apache.axis.Handler

setOptions

public void setOptions(java.util.Hashtable opts)
Specified by:
setOptions in interface org.apache.axis.Handler

setName

public void setName(java.lang.String name)
Set the name (i.e. registry key) of this Handler

Specified by:
setName in interface org.apache.axis.Handler

getName

public java.lang.String getName()
Return the name (i.e. registry key) for this Handler

Specified by:
getName in interface org.apache.axis.Handler

getDeploymentData

public org.w3c.dom.Element getDeploymentData(org.w3c.dom.Document doc)
Specified by:
getDeploymentData in interface org.apache.axis.Handler

generateWSDL

public void generateWSDL(org.apache.axis.MessageContext msgContext)
                  throws org.apache.axis.AxisFault
Specified by:
generateWSDL in interface org.apache.axis.Handler
Throws:
org.apache.axis.AxisFault

getUnderstoodHeaders

public 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.

Specified by:
getUnderstoodHeaders in interface org.apache.axis.Handler

getProperty

public java.lang.Object getProperty(java.lang.Object msgContext,
                                    java.lang.String key)
Specified by:
getProperty in class WSHandler

setProperty

public void setProperty(java.lang.Object msgContext,
                        java.lang.String key,
                        java.lang.Object value)
Specified by:
setProperty in class WSHandler

getPassword

public java.lang.String getPassword(java.lang.Object msgContext)
Specified by:
getPassword in class WSHandler

setPassword

public void setPassword(java.lang.Object msgContext,
                        java.lang.String password)
Specified by:
setPassword in class WSHandler


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.