public final class ContextSwitcher
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private SecurityContext |
additional
If this context had an additional security context when
context was switched, this
will be restored on release. |
private SecurityManager |
sm
Security manager cache.
|
| Constructor and Description |
|---|
ContextSwitcher()
Create a new instance, allow only by the security package.
|
| Modifier and Type | Method and Description |
|---|---|
void |
releaseContext()
Release the current context.
|
(package private) void |
releaseContext(boolean useInitial)
Release the current context.
|
void |
setContext(java.lang.Object sessionId)
Switch the context to the specified session ID.
|
(package private) void |
setContext(java.lang.Object sessionId,
boolean useInitial)
Switch the context to the specified session ID.
|
private final SecurityManager sm
private SecurityContext additional
context was switched, this
will be restored on release.ContextSwitcher()
public void setContext(java.lang.Object sessionId)
sessionId - The session ID.public void releaseContext()
void setContext(java.lang.Object sessionId,
boolean useInitial)
sessionId - The session ID.useInitial - Flag indicating to create an initial security context.void releaseContext(boolean useInitial)
useInitial - Flag indicating to drop the initial security context.