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

## net.jini.security.policy
Interface SecurityContextSource

All Known Implementing Classes:
  AggregatePolicyProvider

public interface SecurityContextSource

Interface that a security manager or policy provider can optionally implement in order to support the saving and restoring of custom security context state. If the installed security manager or policy provider implements this interface, then its `getContext` method is delegated to by the corresponding method of the `Security` class, with precedence given to the security manager.

This interface is intended to be implemented by security managers and policy providers whose security contexts include state in addition to that provided by `AccessControlContext`. For example, a security policy provider that considers thread local values when evaluating security checks may want to include those values in snapshots of the current security context, so that they can be properly restored when the context is reapplied--it can achieve this by implementing the `getContext` method to return a `SecurityContext` instance containing the snapshotted thread local values as well as the current access control context, with `wrap` methods implemented to return privileged action wrappers that properly restore the thread local state.

Since:
  2.0

Method Summary
`SecurityContext` | `getContext()` Returns a snapshot of the current security context, which can be used to restore the context at a later time.

Method Detail

### getContext

    public SecurityContext getContext()

  Returns a snapshot of the current security context, which can be used to restore the context at a later time.

  Returns:
    snapshot of the current security context

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 © 2004 Sun Microsystems, Inc. All rights reserved