private static class AggregatePolicyProvider.AggregateSecurityContext extends Object implements SecurityContext
| Modifier and Type | Field and Description |
|---|---|
private ClassLoader |
ccl |
private int |
hashCode |
private SecurityContext |
sc |
| Constructor and Description |
|---|
AggregateSecurityContext(SecurityContext sc) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
AccessControlContext |
getAccessControlContext()
Returns access control context portion of snapshotted security context.
|
int |
hashCode() |
private ClassLoader |
setCCL(ClassLoader ldr,
boolean force) |
<T> PrivilegedAction<T> |
wrap(PrivilegedAction<T> 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. |
<T> PrivilegedExceptionAction<T> |
wrap(PrivilegedExceptionAction<T> 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. |
private final ClassLoader ccl
private final SecurityContext sc
private final int hashCode
AggregateSecurityContext(SecurityContext sc)
public <T> PrivilegedAction<T> wrap(PrivilegedAction<T> a)
SecurityContextPrivilegedAction 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.wrap in interface SecurityContextT - return type of PrivilegedActiona - the action to be wrappedaction,
or action if no wrapping is necessarypublic <T> PrivilegedExceptionAction<T> wrap(PrivilegedExceptionAction<T> a)
SecurityContextPrivilegedExceptionAction 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.wrap in interface SecurityContextT - return type of PrivilegedExceptionActiona - the action to be wrappedaction,
or action if no wrapping is necessarypublic AccessControlContext getAccessControlContext()
SecurityContextgetAccessControlContext in interface SecurityContextprivate ClassLoader setCCL(ClassLoader ldr, boolean force)
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.