com.sun.xml.wss
Class ProcessingContext

java.lang.Object
  extended by com.sun.xml.wss.ProcessingContext

public class ProcessingContext
extends java.lang.Object

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


Constructor Summary
ProcessingContext()
          Default constructor
ProcessingContext(StaticPolicyContext context, SecurityPolicy securityPolicy, javax.xml.soap.SOAPMessage message)
          Constructor
 
Method Summary
static void copy(java.util.Map p1, java.util.Map p2)
           
 void copy(ProcessingContext ctx1, ProcessingContext ctx2)
          copy operator
 int getConfigType()
          This method is used for internal purposes
 java.util.Map getExtraneousProperties()
          Properties extraneously defined by XWSS runtime - can contain application's runtime context (like JAXRPCContext etc)
 java.lang.Object getExtraneousProperty(java.lang.String name)
           
 javax.security.auth.callback.CallbackHandler getHandler()
           
 java.lang.String getMessageIdentifier()
           
 StaticPolicyContext getPolicyContext()
           
 SecurityEnvironment getSecurityEnvironment()
           
 SecurityPolicy getSecurityPolicy()
           
 javax.xml.soap.SOAPMessage getSOAPMessage()
           
 boolean isInboundMessage()
           
 void isInboundMessage(boolean inBound)
          set the message flow direction (to true if inbound, false if outbound)
 void removeExtraneousProperty(java.lang.String name)
          remove the named extraneous property if present
 void reset()
          This method is used for internal purposes
 void setConfigType(int type)
          This method is used for internal purposes
 void setExtraneousProperty(java.lang.String name, java.lang.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)
 void setHandler(javax.security.auth.callback.CallbackHandler handler)
          set the CallbackHandler for the context
 void setMessageIdentifier(java.lang.String identifier)
          Allow for message identifier to be generated externally
 void setPolicyContext(StaticPolicyContext context)
          set the StaticPolicyContext for this ProcessingContext.
 void setSecurityEnvironment(SecurityEnvironment handler)
          set the SecurityEnvironment Handler for the context
 void setSecurityPolicy(SecurityPolicy securityPolicy)
          set the SecurityPolicy for the context
 void setSOAPMessage(javax.xml.soap.SOAPMessage message)
          set the SOAP Message into the ProcessingContext.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessingContext

public ProcessingContext()
Default constructor


ProcessingContext

public ProcessingContext(StaticPolicyContext context,
                         SecurityPolicy securityPolicy,
                         javax.xml.soap.SOAPMessage message)
                  throws XWSSecurityException
Constructor

Parameters:
context - the static policy context for this request
securityPolicy - the SecurityPolicy to be applied for this request
message - the SOAPMessage
Throws:
XWSSecurityException - if there was an error in creating the ProcessingContext
Method Detail

setSecurityPolicy

public void setSecurityPolicy(SecurityPolicy securityPolicy)
                       throws XWSSecurityException
set the SecurityPolicy for the context

Parameters:
securityPolicy - SecurityPolicy
Throws:
XWSSecurityException - if the securityPolicy is of invalid type

getSecurityPolicy

public SecurityPolicy getSecurityPolicy()
Returns:
SecurityPolicy for this context

setPolicyContext

public void setPolicyContext(StaticPolicyContext context)
set the StaticPolicyContext for this ProcessingContext.

Parameters:
context - StaticPolicyContext for this context

getPolicyContext

public StaticPolicyContext getPolicyContext()
Returns:
StaticPolicyContext associated with this ProcessingContext, null otherwise

setSOAPMessage

public void setSOAPMessage(javax.xml.soap.SOAPMessage message)
                    throws XWSSecurityException
set the SOAP Message into the ProcessingContext.

Parameters:
message - SOAPMessage
Throws:
XWSSecurityException - if there was an error in setting the SOAPMessage

getSOAPMessage

public javax.xml.soap.SOAPMessage getSOAPMessage()
Returns:
the SOAPMessage from the context

setHandler

public void setHandler(javax.security.auth.callback.CallbackHandler handler)
set the CallbackHandler for the context

Parameters:
handler - The CallbackHandler

setSecurityEnvironment

public void setSecurityEnvironment(SecurityEnvironment handler)
set the SecurityEnvironment Handler for the context

Parameters:
handler - The SecurityEnvironment Handler

getHandler

public javax.security.auth.callback.CallbackHandler getHandler()
Returns:
the CallbackHandler set for the context

getSecurityEnvironment

public SecurityEnvironment getSecurityEnvironment()
Returns:
The SecurityEnvironment Handler set for the context

getExtraneousProperties

public java.util.Map getExtraneousProperties()
Properties extraneously defined by XWSS runtime - can contain application's runtime context (like JAXRPCContext etc)

Returns:
Map of extraneous properties

isInboundMessage

public void isInboundMessage(boolean inBound)
set the message flow direction (to true if inbound, false if outbound)

Parameters:
inBound - message flow direction

isInboundMessage

public boolean isInboundMessage()
Returns:
message flow direction, true if incoming, false otherwise

setMessageIdentifier

public void setMessageIdentifier(java.lang.String identifier)
Allow for message identifier to be generated externally

Parameters:
identifier - the Message Identifier value

getMessageIdentifier

public java.lang.String getMessageIdentifier()
Returns:
message identifier for the Message in the context

setExtraneousProperty

public void setExtraneousProperty(java.lang.String name,
                                  java.lang.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)

Parameters:
name - the property name
value - the property value

getExtraneousProperty

public java.lang.Object getExtraneousProperty(java.lang.String name)
Returns:
the value for the named extraneous property.

removeExtraneousProperty

public void removeExtraneousProperty(java.lang.String name)
remove the named extraneous property if present

Parameters:
name - the Extraneous Property to be removed

copy

public static void copy(java.util.Map p1,
                        java.util.Map p2)

copy

public void copy(ProcessingContext ctx1,
                 ProcessingContext ctx2)
          throws XWSSecurityException
copy operator

Parameters:
ctx1 - the ProcessingContext to which to copy
ctx2 - the ProcessingContext from which to copy
Throws:
XWSSecurityException - if there was an error during the copy operation

reset

public void reset()
This method is used for internal purposes


getConfigType

public int getConfigType()
This method is used for internal purposes


setConfigType

public void setConfigType(int type)
This method is used for internal purposes



Copyright ? 2005 Sun Microsystems, Inc. All Rights Reserved.