Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.security.jacc
Interface PolicyContextHandler

public interface PolicyContextHandler

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

Version:
  $Revision: 1.2 $
Author:
  Scott.Stark@jboss.org, Ron Monzillo, Gary Ellison (javadoc)
See Also:
  `http://java.sun.com/j2ee/1.4/docs/api/`

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

Method Detail

### getContext

    public Object getContext(String key,
                             Object data)
                      throws PolicyContextException

  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`

### getKeys

    public String[] getKeys()
                     throws PolicyContextException

  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`

### supports

    public boolean supports(String key)
                     throws PolicyContextException

  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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.