org.jboss.security.jacc
Class SubjectPolicyContextHandler
java.lang.Object
org.jboss.security.jacc.SubjectPolicyContextHandler
- All Implemented Interfaces:
- PolicyContextHandler (src)
- public class SubjectPolicyContextHandler
- extends java.lang.Object
- implements PolicyContextHandler (src)
A PolicyContextHandler for the current authenticated Subject.
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SUBJECT_CONTEXT_KEY
public static final java.lang.String SUBJECT_CONTEXT_KEY
- See Also:
- Constant Field Values (src)
EMPTY_SET
public static final java.util.HashSet EMPTY_SET
SubjectPolicyContextHandler
public SubjectPolicyContextHandler()
getContext
public java.lang.Object getContext(java.lang.String key,
java.lang.Object data)
throws PolicyContextException (src)
- Description copied from interface:
PolicyContextHandler (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.
- Specified by:
getContext
in interface PolicyContextHandler (src)
- 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)
- Description copied from interface:
PolicyContextHandler (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.
- Specified by:
getKeys
in interface PolicyContextHandler (src)
- Returns:
- the list of supported context object keys.
- Throws:
PolicyContextException (src)
supports
public boolean supports(java.lang.String key)
throws PolicyContextException (src)
- Description copied from interface:
PolicyContextHandler (src)
- Query the handler to see if its getContext(String, Object) method
supports the given key.
- Specified by:
supports
in interface PolicyContextHandler (src)
- Parameters:
key
- - the context object key to check.
- Returns:
- true if the key is supported, false otherwise
- Throws:
PolicyContextException (src)