Class ProcessingContext

  • All Implemented Interfaces:
    SecurityProcessingContext
    Direct Known Subclasses:
    ProcessingContextImpl

    public class ProcessingContext
    extends Object
    implements SecurityProcessingContext
    This class represents a Context that is used by the XWS-Security Runtime to apply/verify Security Policies on an Outgoing/Incoming SOAP Message. The context contains among other things
    • The SOAP Message to be operated upon
    • The Message direction (incoming or outgoing)
    • The security policy to be applied by XWS-Security on the message
    • A randomly generated Message-Identifier that can be used for request-response correlation, by a CallbackHandler, the handles DynamicPolicyCallback
    • A list of properties associated with the calling Application Runtime, that can be used to make Dynamic Policy decisions.
    • A concrete implementation of the SecurityEnvironment interface OR a CallbackHandler
    • Constructor Detail

      • ProcessingContext

        public ProcessingContext()
        Default constructor
      • ProcessingContext

        public ProcessingContext​(StaticPolicyContext context,
                                 SecurityPolicy securityPolicy,
                                 javax.xml.soap.SOAPMessage message)
                          throws com.sun.xml.wss.XWSSecurityException
        Constructor
        Parameters:
        context - the static policy context for this request
        securityPolicy - the SecurityPolicy to be applied for this request
        message - the SOAPMessage
        Throws:
        com.sun.xml.wss.XWSSecurityException - if there was an error in creating the ProcessingContext
    • Method Detail

      • resetMustUnderstand

        public void resetMustUnderstand​(boolean b)
      • resetMustUnderstand

        public boolean resetMustUnderstand()
      • setSecurityPolicy

        public void setSecurityPolicy​(SecurityPolicy securityPolicy)
                               throws com.sun.xml.wss.XWSSecurityException
        set the SecurityPolicy for the context
        Specified by:
        setSecurityPolicy in interface SecurityProcessingContext
        Parameters:
        securityPolicy - SecurityPolicy
        Throws:
        com.sun.xml.wss.XWSSecurityException - if the securityPolicy is of invalid type
      • setSOAPMessage

        public void setSOAPMessage​(javax.xml.soap.SOAPMessage message)
                            throws com.sun.xml.wss.XWSSecurityException
        set the SOAP Message into the ProcessingContext.
        Specified by:
        setSOAPMessage in interface SecurityProcessingContext
        Parameters:
        message - SOAPMessage
        Throws:
        com.sun.xml.wss.XWSSecurityException - if there was an error in setting the SOAPMessage
      • getExtraneousProperties

        public Map getExtraneousProperties()
        Properties extraneously defined by XWSS runtime - can contain application's runtime context (like JAXRPCContext etc)
        Specified by:
        getExtraneousProperties in interface SecurityProcessingContext
        Returns:
        Map of extraneous properties
      • isInboundMessage

        public void isInboundMessage​(boolean inBound)
        set the message flow direction (to true if inbound, false if outbound)
        Specified by:
        isInboundMessage in interface SecurityProcessingContext
        Parameters:
        inBound - message flow direction
      • setMessageIdentifier

        public void setMessageIdentifier​(String identifier)
        Allow for message identifier to be generated externally
        Specified by:
        setMessageIdentifier in interface SecurityProcessingContext
        Parameters:
        identifier - the Message Identifier value
      • setExtraneousProperty

        public void setExtraneousProperty​(String name,
                                          Object value)
        set the extraneous property into the context Extraneous Properties are properties extraneously defined by XWSS runtime and can contain application's runtime context (like JAXRPCContext etc)
        Specified by:
        setExtraneousProperty in interface SecurityProcessingContext
        Parameters:
        name - the property name
        value - the property value
      • copy

        public static void copy​(Map p1,
                                Map p2)
      • copy

        public void copy​(ProcessingContext ctx1,
                         ProcessingContext ctx2)
                  throws com.sun.xml.wss.XWSSecurityException
        copy operator
        Parameters:
        ctx1 - the ProcessingContext to which to copy
        ctx2 - the ProcessingContext from which to copy
        Throws:
        com.sun.xml.wss.XWSSecurityException - if there was an error during the copy operation
      • setSecurityHeaderLayout

        public void setSecurityHeaderLayout​(MessageLayout layout)
      • getSecurityHeaderLayout

        public MessageLayout getSecurityHeaderLayout()
      • retainSecurityHeader

        public boolean retainSecurityHeader()
      • retainSecurityHeader

        public void retainSecurityHeader​(boolean arg)
      • isClient

        public void isClient​(boolean isClient)
      • isClient

        public boolean isClient()
      • isExpired

        public boolean isExpired()
      • isExpired

        public void isExpired​(boolean value)