Class AbstractWSS4JInterceptor

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

public abstract class AbstractWSS4JInterceptor extends WSHandler implements org.apache.cxf.binding.soap.interceptor.SoapInterceptor, PhaseInterceptor<org.apache.cxf.binding.soap.SoapMessage>
  • Constructor Details

    • AbstractWSS4JInterceptor

      public AbstractWSS4JInterceptor()
  • Method Details

    • getRoles

      public Set<URI> getRoles()
      Specified by:
      getRoles in interface org.apache.cxf.binding.soap.interceptor.SoapInterceptor
    • handleFault

      public void handleFault(org.apache.cxf.binding.soap.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<org.apache.cxf.binding.soap.SoapMessage>
    • postHandleMessage

      public void postHandleMessage(org.apache.cxf.binding.soap.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<org.apache.cxf.binding.soap.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<org.apache.cxf.binding.soap.SoapMessage>
      Returns:
      the phase
    • setPhase

      public void setPhase(String phase)
    • getOption

      public Object getOption(String key)
      Specified by:
      getOption in class WSHandler
    • setProperty

      public void setProperty(String key, String value)
    • getPassword

      public String getPassword(Object msgContext)
      Specified by:
      getPassword in class WSHandler
    • getProperty

      public Object getProperty(Object msgContext, String key)
      Specified by:
      getProperty in class WSHandler
    • setPassword

      public void setPassword(Object msgContext, String password)
      Specified by:
      setPassword in class WSHandler
    • setProperty

      public void setProperty(Object msgContext, String key, Object value)
      Specified by:
      setProperty in class WSHandler
    • getId

      public String getId()
      Description copied from interface: PhaseInterceptor
      Returns the ID of this interceptor.
      Specified by:
      getId in interface PhaseInterceptor<org.apache.cxf.binding.soap.SoapMessage>
      Returns:
      the ID
    • setId

      public void setId(String id)
    • getUnderstoodHeaders

      public Set<QName> getUnderstoodHeaders()
      Specified by:
      getUnderstoodHeaders in interface org.apache.cxf.binding.soap.interceptor.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<org.apache.cxf.binding.soap.SoapMessage>
      Returns:
      the IDs of the interceptors
    • 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<org.apache.cxf.binding.soap.SoapMessage>
      Returns:
      the ids of the interceptors
    • isRequestor

      protected boolean isRequestor(org.apache.cxf.binding.soap.SoapMessage message)
    • translateProperties

      protected void translateProperties(org.apache.cxf.binding.soap.SoapMessage msg)
    • loadCryptoFromPropertiesFile

      protected Crypto loadCryptoFromPropertiesFile(String propFilename, RequestData reqData) throws WSSecurityException
      Description copied from class: WSHandler
      A hook to allow subclass to load Crypto instances from property files in a different way.
      Overrides:
      loadCryptoFromPropertiesFile in class WSHandler
      Parameters:
      propFilename - The property file name
      reqData - The RequestData object
      Returns:
      A Crypto instance that has been loaded
      Throws:
      WSSecurityException