Apache CXF API

org.apache.cxf.ws.security.wss4j
Class AbstractWSS4JInterceptor

java.lang.Object
  extended by org.apache.ws.security.handler.WSHandler
      extended by org.apache.cxf.ws.security.wss4j.AbstractWSS4JInterceptor
All Implemented Interfaces:
SoapInterceptor, Interceptor<SoapMessage>, PhaseInterceptor<SoapMessage>
Direct Known Subclasses:
WSS4JInInterceptor, WSS4JOutInterceptor

public abstract class AbstractWSS4JInterceptor
extends org.apache.ws.security.handler.WSHandler
implements SoapInterceptor, PhaseInterceptor<SoapMessage>


Field Summary
 
Fields inherited from class org.apache.ws.security.handler.WSHandler
cryptos, secEngine
 
Constructor Summary
AbstractWSS4JInterceptor()
           
 
Method Summary
 Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
          Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added.
 Set<String> getAfter()
          Returns a set containing the IDs of the interceptors that should be executed before this interceptor.
 Set<String> getBefore()
          Returns a set containing the IDs of the interceptors that should be executed after this interceptor.
 String getId()
          Returns the ID of this interceptor.
 Object getOption(String key)
           
 String getPassword(Object msgContext)
           
 String getPhase()
          Returns the phase in which this interceptor is excecuted.
 Map<String,Object> getProperties()
           
 Object getProperty(Object msgContext, String key)
           
 Set<URI> getRoles()
           
 Set<QName> getUnderstoodHeaders()
           
 void handleFault(SoapMessage message)
          Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.
protected  boolean isRequestor(SoapMessage message)
           
protected  org.apache.ws.security.components.crypto.Crypto loadCrypto(String cryptoPropertyFile, String cryptoPropertyRefId, org.apache.ws.security.handler.RequestData requestData)
           
protected  org.apache.ws.security.components.crypto.Crypto loadCryptoFromPropertiesFile(String propFilename, org.apache.ws.security.handler.RequestData reqData)
           
 void postHandleMessage(SoapMessage message)
           
 void setAfter(Set<String> after)
           
 void setBefore(Set<String> before)
           
 void setId(String id)
           
 void setPassword(Object msgContext, String password)
           
 void setPhase(String phase)
           
 void setProperties(Map<String,Object> properties)
           
 void setProperty(Object msgContext, String key, Object value)
           
 void setProperty(String key, String value)
           
protected  void translateProperties(SoapMessage msg)
           
 
Methods inherited from class org.apache.ws.security.handler.WSHandler
checkReceiverResults, checkReceiverResultsAnyOrder, checkSignatureConfirmation, decodeBooleanConfigValue, decodeBSPCompliance, decodeCustomPasswordTypes, decodeDecryptionParameter, decodeEnableSignatureConfirmation, decodeEncryptionParameter, decodeFutureTimeToLive, decodeMustUnderstand, decodeNamespaceQualifiedPasswordTypes, decodePasswordType, decodePasswordTypeStrict, decodeRequireSignedEncryptedDataElements, decodeSignatureParameter, decodeSignatureParameter2, decodeTimestampPrecision, decodeTimestampStrict, decodeTimeToLive, decodeUseEncodedPasswords, decodeUseSingleCertificate, decodeUTParameter, doReceiverAction, doSenderAction, getCallbackHandler, getClassLoader, getPasswordCallbackHandler, getPasswordCB, getString, getStringOption, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.interceptor.Interceptor
handleMessage
 
Methods inherited from interface org.apache.cxf.interceptor.Interceptor
handleMessage
 

Constructor Detail

AbstractWSS4JInterceptor

public AbstractWSS4JInterceptor()
Method Detail

getRoles

public Set<URI> getRoles()
Specified by:
getRoles in interface SoapInterceptor

handleFault

public void handleFault(SoapMessage message)
Description copied from interface: Interceptor
Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.

Specified by:
handleFault in interface Interceptor<SoapMessage>

postHandleMessage

public void postHandleMessage(SoapMessage message)
                       throws Fault
Throws:
Fault

getAdditionalInterceptors

public Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
Description copied from interface: PhaseInterceptor
Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.

Specified by:
getAdditionalInterceptors in interface PhaseInterceptor<SoapMessage>
Returns:
the collection of interceptors

getPhase

public String getPhase()
Description copied from interface: PhaseInterceptor
Returns the phase in which this interceptor is excecuted.

Specified by:
getPhase in interface PhaseInterceptor<SoapMessage>
Returns:
the phase

setPhase

public void setPhase(String phase)

getOption

public Object getOption(String key)
Specified by:
getOption in class org.apache.ws.security.handler.WSHandler

setProperty

public void setProperty(String key,
                        String value)

getPassword

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

getProperty

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

setPassword

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

setProperty

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

getId

public String getId()
Description copied from interface: PhaseInterceptor
Returns the ID of this interceptor.

Specified by:
getId in interface PhaseInterceptor<SoapMessage>
Returns:
the ID

setId

public void setId(String id)

getUnderstoodHeaders

public Set<QName> getUnderstoodHeaders()
Specified by:
getUnderstoodHeaders in interface SoapInterceptor

getProperties

public Map<String,Object> getProperties()

setProperties

public void setProperties(Map<String,Object> properties)

getAfter

public Set<String> getAfter()
Description copied from interface: PhaseInterceptor
Returns a set containing the IDs of the interceptors that should be executed before this interceptor. This interceptor will be placed in the chain after the interceptors in the set.

Specified by:
getAfter in interface PhaseInterceptor<SoapMessage>
Returns:
the IDs of the interceptors

setAfter

public void setAfter(Set<String> after)

getBefore

public Set<String> getBefore()
Description copied from interface: PhaseInterceptor
Returns a set containing the IDs of the interceptors that should be executed after this interceptor. This interceptor will be placed in the inteceptor chain before the interceptors in the set.

Specified by:
getBefore in interface PhaseInterceptor<SoapMessage>
Returns:
the ids of the interceptors

setBefore

public void setBefore(Set<String> before)

isRequestor

protected boolean isRequestor(SoapMessage message)

translateProperties

protected void translateProperties(SoapMessage msg)

loadCryptoFromPropertiesFile

protected org.apache.ws.security.components.crypto.Crypto loadCryptoFromPropertiesFile(String propFilename,
                                                                                       org.apache.ws.security.handler.RequestData reqData)
                                                                                throws org.apache.ws.security.WSSecurityException
Overrides:
loadCryptoFromPropertiesFile in class org.apache.ws.security.handler.WSHandler
Throws:
org.apache.ws.security.WSSecurityException

loadCrypto

protected org.apache.ws.security.components.crypto.Crypto loadCrypto(String cryptoPropertyFile,
                                                                     String cryptoPropertyRefId,
                                                                     org.apache.ws.security.handler.RequestData requestData)
                                                              throws org.apache.ws.security.WSSecurityException
Overrides:
loadCrypto in class org.apache.ws.security.handler.WSHandler
Throws:
org.apache.ws.security.WSSecurityException

Apache CXF API

Apache CXF