com.sun.jini.start
Class AggregatePolicyProvider.AggregateSecurityContext

java.lang.Object
  extended by com.sun.jini.start.AggregatePolicyProvider.AggregateSecurityContext
All Implemented Interfaces:
SecurityContext
Enclosing class:
AggregatePolicyProvider

private static class AggregatePolicyProvider.AggregateSecurityContext
extends Object
implements SecurityContext

Security context that produces privileged action wrappers which restore the context class loader before delegating to the sub-policy context's wrapped action.


Field Summary
private  ClassLoader ccl
           
private  SecurityContext sc
           
 
Constructor Summary
AggregatePolicyProvider.AggregateSecurityContext(SecurityContext sc)
           
 
Method Summary
 AccessControlContext getAccessControlContext()
          Returns access control context portion of snapshotted security context.
private  ClassLoader setCCL(ClassLoader ldr, boolean force)
           
 PrivilegedAction wrap(PrivilegedAction a)
          Returns a security context-restoring PrivilegedAction that wraps the given action, or returns the action itself if the security context does not include any non-AccessControlContext state to restore.
 PrivilegedExceptionAction wrap(PrivilegedExceptionAction a)
          Returns a security context-restoring PrivilegedExceptionAction that wraps the given action, or returns the action itself if the security context does not include any non-AccessControlContext state to restore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ccl

private final ClassLoader ccl

sc

private final SecurityContext sc
Constructor Detail

AggregatePolicyProvider.AggregateSecurityContext

AggregatePolicyProvider.AggregateSecurityContext(SecurityContext sc)
Method Detail

wrap

public PrivilegedAction wrap(PrivilegedAction a)
Description copied from interface: SecurityContext
Returns a security context-restoring PrivilegedAction that wraps the given action, or returns the action itself if the security context does not include any non-AccessControlContext state to restore. The run method of the "wrapper" action (if any) restores the non-AccessControlContext state of the security context before invoking the run method of the wrapped action, and unrestores that state after the wrapped action's run method has completed (normally or otherwise). The value returned or exception thrown by the wrapped action's run method is propagated through the run method of the wrapper action.

Specified by:
wrap in interface SecurityContext
Parameters:
a - the action to be wrapped
Returns:
security context-restoring action wrapping action, or action if no wrapping is necessary

wrap

public PrivilegedExceptionAction wrap(PrivilegedExceptionAction a)
Description copied from interface: SecurityContext
Returns a security context-restoring PrivilegedExceptionAction that wraps the given action, or returns the action itself if the security context does not include any non-AccessControlContext state to restore. The run method of the "wrapper" action (if any) restores the non-AccessControlContext state of the security context before invoking the run method of the wrapped action, and unrestores that state after the wrapped action's run method has completed (normally or otherwise). The value returned or exception thrown by the wrapped action's run method is propagated through the run method of the wrapper action.

Specified by:
wrap in interface SecurityContext
Parameters:
a - the action to be wrapped
Returns:
security context-restoring action wrapping action, or action if no wrapping is necessary

getAccessControlContext

public AccessControlContext getAccessControlContext()
Description copied from interface: SecurityContext
Returns access control context portion of snapshotted security context.

Specified by:
getAccessControlContext in interface SecurityContext
Returns:
access control context portion of snapshotted security context

setCCL

private ClassLoader setCCL(ClassLoader ldr,
                           boolean force)


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.