org.apache.rampart.handler
Class WSDoAllHandler

java.lang.Object
  extended by org.apache.ws.security.handler.WSHandler
      extended by org.apache.rampart.handler.WSDoAllHandler
All Implemented Interfaces:
org.apache.axis2.engine.Handler
Direct Known Subclasses:
WSDoAllReceiver, WSDoAllSender

public abstract class WSDoAllHandler
extends org.apache.ws.security.handler.WSHandler
implements org.apache.axis2.engine.Handler

Class WSDoAllHandler


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.axis2.engine.Handler
org.apache.axis2.engine.Handler.InvocationResponse
 
Field Summary
protected  org.apache.axis2.description.HandlerDescription handlerDesc
          Field handlerDesc
protected  boolean inHandler
          In Axis2, the user cannot set inflow and outflow parameters.
 
Fields inherited from class org.apache.ws.security.handler.WSHandler
cryptos, DONE, secEngine
 
Constructor Summary
WSDoAllHandler()
          Constructor AbstractHandler.
 
Method Summary
 void cleanup()
          Method cleanup.
 void flowComplete(org.apache.axis2.context.MessageContext msgContext)
           
 java.lang.ClassLoader getClassLoader(java.lang.Object msgCtx)
          Overrides the class loader used to load the PW callback class.
protected  int getCurrentRepetition(java.lang.Object msgContext)
          Returns the repetition number from the message context
 org.apache.axis2.description.HandlerDescription getHandlerDesc()
          Gets the handler description.
 java.lang.String getName()
          Method getName.
 java.lang.Object getOption(java.lang.String axisKey)
          Gets option.
 org.apache.axis2.description.Parameter getParameter(java.lang.String name)
          Method getParameter.
 java.lang.String getPassword(java.lang.Object msgContext)
           
 java.lang.Object getProperty(java.lang.Object msgContext, java.lang.String axisKey)
           
 java.lang.String getUsername(java.lang.Object msgContext)
           
 void init(org.apache.axis2.description.HandlerDescription handlerdesc)
          Method init.
 org.apache.axis2.engine.Handler.InvocationResponse invoke(org.apache.axis2.context.MessageContext msgContext)
           
abstract  void processMessage(org.apache.axis2.context.MessageContext msgContext)
           
 void setPassword(java.lang.Object msgContext, java.lang.String password)
           
 void setProperty(java.lang.Object msgContext, java.lang.String key, java.lang.Object value)
           
 void setUsername(java.lang.Object msgContext, java.lang.String username)
           
 java.lang.String toString()
           
 
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, getPassword, getPasswordCB, getString, getStringOption, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto, verifyTimestamp, verifyTrust
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

handlerDesc

protected org.apache.axis2.description.HandlerDescription handlerDesc
Field handlerDesc


inHandler

protected boolean inHandler
In Axis2, the user cannot set inflow and outflow parameters. Therefore, we need to map the Axis2 specific inflow and outflow parameters to WSS4J params,

Knowledge of inhandler and out handler is used to get the mapped value.

Constructor Detail

WSDoAllHandler

public WSDoAllHandler()
Constructor AbstractHandler.

Method Detail

processMessage

public abstract void processMessage(org.apache.axis2.context.MessageContext msgContext)
                             throws org.apache.axis2.AxisFault
Throws:
org.apache.axis2.AxisFault

invoke

public org.apache.axis2.engine.Handler.InvocationResponse invoke(org.apache.axis2.context.MessageContext msgContext)
                                                          throws org.apache.axis2.AxisFault
Specified by:
invoke in interface org.apache.axis2.engine.Handler
Throws:
org.apache.axis2.AxisFault

flowComplete

public void flowComplete(org.apache.axis2.context.MessageContext msgContext)
Specified by:
flowComplete in interface org.apache.axis2.engine.Handler

getName

public java.lang.String getName()
Method getName.

Specified by:
getName in interface org.apache.axis2.engine.Handler
Returns:
Returns name.

cleanup

public void cleanup()
Method cleanup.

Specified by:
cleanup in interface org.apache.axis2.engine.Handler

getParameter

public org.apache.axis2.description.Parameter getParameter(java.lang.String name)
Method getParameter.

Specified by:
getParameter in interface org.apache.axis2.engine.Handler
Parameters:
name -
Returns:
Returns parameter.

init

public void init(org.apache.axis2.description.HandlerDescription handlerdesc)
Method init.

Specified by:
init in interface org.apache.axis2.engine.Handler
Parameters:
handlerdesc -

getHandlerDesc

public org.apache.axis2.description.HandlerDescription getHandlerDesc()
Gets the handler description.

Specified by:
getHandlerDesc in interface org.apache.axis2.engine.Handler
Returns:
Returns handler description.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getProperty

public java.lang.Object getProperty(java.lang.Object msgContext,
                                    java.lang.String axisKey)
Specified by:
getProperty in class org.apache.ws.security.handler.WSHandler

getCurrentRepetition

protected int getCurrentRepetition(java.lang.Object msgContext)
Returns the repetition number from the message context

Parameters:
msgContext -
Returns:
Returns int.

getPassword

public java.lang.String getPassword(java.lang.Object msgContext)
Specified by:
getPassword in class org.apache.ws.security.handler.WSHandler

setPassword

public void setPassword(java.lang.Object msgContext,
                        java.lang.String password)
Specified by:
setPassword in class org.apache.ws.security.handler.WSHandler

getUsername

public java.lang.String getUsername(java.lang.Object msgContext)

setUsername

public void setUsername(java.lang.Object msgContext,
                        java.lang.String username)

getOption

public java.lang.Object getOption(java.lang.String axisKey)
Gets option. Extracts the configuration values from the service.xml and/or axis2.xml. Values set in the service.xml takes priority over values of the axis2.xml

Specified by:
getOption in class org.apache.ws.security.handler.WSHandler

setProperty

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

getClassLoader

public java.lang.ClassLoader getClassLoader(java.lang.Object msgCtx)
Overrides the class loader used to load the PW callback class.

Overrides:
getClassLoader in class org.apache.ws.security.handler.WSHandler
Parameters:
msgCtx - MessageContext
Returns:
Returns class loader.