Package org.apache.cxf.ws.security.wss4j
Class AbstractWSS4JInterceptor
- java.lang.Object
-
- org.apache.wss4j.dom.handler.WSHandler
-
- 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.wss4j.dom.handler.WSHandler implements SoapInterceptor, PhaseInterceptor<SoapMessage>
-
-
Constructor Summary
Constructors Constructor Description AbstractWSS4JInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.StringgetId()Returns the ID of this interceptor.ObjectgetOption(String key)StringgetPassword(Object msgContext)StringgetPhase()Returns the phase in which this interceptor is excecuted.Map<String,Object>getProperties()ObjectgetProperty(Object msgContext, String key)Set<URI>getRoles()Set<QName>getUnderstoodHeaders()voidhandleFault(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 booleanisRequestor(SoapMessage message)protected org.apache.wss4j.common.crypto.CryptoloadCryptoFromPropertiesFile(String propFilename, org.apache.wss4j.dom.handler.RequestData reqData)voidpostHandleMessage(SoapMessage message)voidsetId(String id)voidsetPassword(Object msgContext, String password)voidsetPhase(String phase)voidsetProperties(Map<String,Object> properties)voidsetProperty(Object msgContext, String key, Object value)voidsetProperty(String key, String value)protected voidtranslateProperties(SoapMessage msg)-
Methods inherited from class org.apache.wss4j.dom.handler.WSHandler
checkReceiverResults, checkReceiverResultsAnyOrder, checkSignatureConfirmation, decodeAlgorithmSuite, decodeBooleanConfigValue, decodeDecryptionParameter, decodeEncryptionParameter, decodeFutureTimeToLive, decodePasswordType, decodeSignatureParameter, decodeSignatureParameter2, decodeTimeToLive, decodeUTParameter, doReceiverAction, doSenderAction, getCallbackHandler, getClassLoader, getPasswordCallbackHandler, getPasswordCB, getPasswordEncryptor, getString, getStringOption, loadCrypto, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto, loadSignatureVerificationCrypto
-
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
-
-
-
-
Method Detail
-
getRoles
public Set<URI> getRoles()
- Specified by:
getRolesin interfaceSoapInterceptor
-
handleFault
public void handleFault(SoapMessage message)
Description copied from interface:InterceptorCalled 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:
handleFaultin interfaceInterceptor<SoapMessage>
-
postHandleMessage
public void postHandleMessage(SoapMessage message) throws Fault
- Throws:
Fault
-
getAdditionalInterceptors
public Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
Description copied from interface:PhaseInterceptorReturns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.- Specified by:
getAdditionalInterceptorsin interfacePhaseInterceptor<SoapMessage>- Returns:
- the collection of interceptors
-
getPhase
public String getPhase()
Description copied from interface:PhaseInterceptorReturns the phase in which this interceptor is excecuted.- Specified by:
getPhasein interfacePhaseInterceptor<SoapMessage>- Returns:
- the phase
-
setPhase
public void setPhase(String phase)
-
getOption
public Object getOption(String key)
- Specified by:
getOptionin classorg.apache.wss4j.dom.handler.WSHandler
-
getPassword
public String getPassword(Object msgContext)
- Specified by:
getPasswordin classorg.apache.wss4j.dom.handler.WSHandler
-
getProperty
public Object getProperty(Object msgContext, String key)
- Specified by:
getPropertyin classorg.apache.wss4j.dom.handler.WSHandler
-
setPassword
public void setPassword(Object msgContext, String password)
- Specified by:
setPasswordin classorg.apache.wss4j.dom.handler.WSHandler
-
setProperty
public void setProperty(Object msgContext, String key, Object value)
- Specified by:
setPropertyin classorg.apache.wss4j.dom.handler.WSHandler
-
getId
public String getId()
Description copied from interface:PhaseInterceptorReturns the ID of this interceptor.- Specified by:
getIdin interfacePhaseInterceptor<SoapMessage>- Returns:
- the ID
-
setId
public void setId(String id)
-
getUnderstoodHeaders
public Set<QName> getUnderstoodHeaders()
- Specified by:
getUnderstoodHeadersin interfaceSoapInterceptor
-
getAfter
public Set<String> getAfter()
Description copied from interface:PhaseInterceptorReturns 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:
getAfterin interfacePhaseInterceptor<SoapMessage>- Returns:
- the IDs of the interceptors
-
getBefore
public Set<String> getBefore()
Description copied from interface:PhaseInterceptorReturns 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:
getBeforein interfacePhaseInterceptor<SoapMessage>- Returns:
- the ids of the interceptors
-
isRequestor
protected boolean isRequestor(SoapMessage message)
-
translateProperties
protected void translateProperties(SoapMessage msg)
-
loadCryptoFromPropertiesFile
protected org.apache.wss4j.common.crypto.Crypto loadCryptoFromPropertiesFile(String propFilename, org.apache.wss4j.dom.handler.RequestData reqData) throws org.apache.wss4j.common.ext.WSSecurityException
- Overrides:
loadCryptoFromPropertiesFilein classorg.apache.wss4j.dom.handler.WSHandler- Throws:
org.apache.wss4j.common.ext.WSSecurityException
-
-