Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weblogic.security.service
Interface ContextHandler

public interface ContextHandler

The `ContextHandler` interface provides a way for an internal WebLogic container to pass additional information to a WebLogic Security Framework call, so that a security provider can obtain additional context information beyond what is provided by the arguments to a particular method. A `ContextHandler` is essentially a name/value list and as such, it requires a security provider to know what names to look for (that is, use of a `ContextHandler` requires close cooperation between the Weblogic container and a security provider). The name/value list is also called a context element, and is represented by a `ContextElement` object.

A `ContextHandler` argument is passed into the `isAccessAllowed` method of an AccessDecision, so you can view this method as an example. As another example, if one was attempting to access a file in a directory, the name of that file could be passed through a `ContextHandler` object.

Author:
  Copyright (c) 2002 by BEA Systems, Inc. All Rights Reserved.

Method Summary
`java.lang.String[]` | `getNames()` Gets a list of `ContextElement` names that can be requested.
`java.lang.Object` | `getValue(java.lang.String name)` Gets a value for the specified `ContextElement` name.
`ContextElement[]` | `getValues(java.lang.String[] names)` Gets an array of `ContextElement` objects containing values for each of the named elements that are known.
`int` | `size()` Provides a count of the number of `ContextElement`s that the handler is able to return.

Method Detail

### size

    public int size()

  Provides a count of the number of `ContextElement`s that the handler is able to return.

  Returns:
    the number of `ContextElement`s that can be requested. A value of `-1` indicates that the handler is unable to return the exact count.

### getNames

    public java.lang.String[] getNames()

  Gets a list of `ContextElement` names that can be requested.

  Returns:
    the names of the `ContextElement`s that can be requested, represented as an array of Strings.

### getValue

    public java.lang.Object getValue(java.lang.String name)

  Gets a value for the specified `ContextElement` name.

  Parameters:
    `name` - the name of the `ContextElement` for which a value should be returned, represented as a String.

  Returns:
    an `Object` that contains the value of the requested name. If the value of the `name` parameter is unknown, a `null` value is returned.

### getValues

    public ContextElement[] getValues(java.lang.String[] names)

  Gets an array of `ContextElement` objects containing values for each of the named elements that are known.

  Parameters:
    `names` - the names of the `ContextElement`s to be returned, represented as an array of Strings.

  Returns:
    an array containing a `ContextElement` object for each of the named elements found in the `names` parameter. The value for the requested element is returned as a `java.lang.Object`. As a result, the caller must know the data type of the value.

    If a name in the `names` parameter is unknown, the name will not appear in the array of `ContextElement` objects.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs70
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 BEA Systems, Inc. All Rights Reserved.
WebLogic Server 7.0 API Reference