javax.security.jacc
Interface PolicyContextHandler

All Known Implementing Classes:
BeanMetaDataPolicyContextHandler (src) , EJBArgsPolicyContextHandler (src) , EnterpriseBeanPolicyContextHandler (src) , HttpServletRequestPolicyContextHandler (src) , SOAPMsgPolicyContextHandler (src) , SubjectPolicyContextHandler (src)

public interface PolicyContextHandler

JACC interface which defines the methods that must be implemented by handlers that are to be registered and activated by PolicyContexts

See Also:
http://java.sun.com/j2ee/1.4/docs/api/

Method Summary
 java.lang.Object getContext(java.lang.String key, java.lang.Object data)
          Used by the PolicyContext class to activate the handler and obtain from it the context object identified by the given key.
 java.lang.String[] getKeys()
          Get the keys identifying the context objects supported by this handlers getContext(String, Object) method.
 boolean supports(java.lang.String key)
          Query the handler to see if its getContext(String, Object) method supports the given key.
 

Method Detail

getContext

public java.lang.Object getContext(java.lang.String key,
                                   java.lang.Object data)
                            throws PolicyContextException (src) 
Used by the PolicyContext class to activate the handler and obtain from it the context object identified by the given key. In addition to the key, the handler will be activated with the handler data value associated within the PolicyContext class with the thread on which the call to this method is made.

Parameters:
key - - a non-null key indicating which context to return.
data - - the possiblye null handler data Object associated with the thread on which the call to this method has been made.
Returns:
The container and handler specific Object containing the desired context. A null value may be returned if the value of the corresponding context is null.
Throws:
PolicyContextException (src)

getKeys

public java.lang.String[] getKeys()
                           throws PolicyContextException (src) 
Get the keys identifying the context objects supported by this handlers getContext(String, Object) method. The value of each key supported by a handler must be a non-null String value.

Returns:
the list of supported context object keys.
Throws:
PolicyContextException (src)

supports

public boolean supports(java.lang.String key)
                 throws PolicyContextException (src) 
Query the handler to see if its getContext(String, Object) method supports the given key.

Parameters:
key - - the context object key to check.
Returns:
true if the key is supported, false otherwise
Throws:
PolicyContextException (src)