public class GlobalSecurityContextHolderStrategy extends java.lang.Object implements SecurityContextHolderStrategy
static field-based implementation of SecurityContextHolderStrategy.This means that all instances in the JVM share the
same SecurityContext. This is generally useful with rich clients, such as Swing.
| Constructor and Description |
|---|
GlobalSecurityContextHolderStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearContext()
Clears the current context.
|
SecurityContext |
getContext()
Obtains the current context.
|
void |
setContext(SecurityContext context)
Sets the current context.
|
public void clearContext()
SecurityContextHolderStrategyclearContext in interface SecurityContextHolderStrategypublic SecurityContext getContext()
SecurityContextHolderStrategygetContext in interface SecurityContextHolderStrategynull - create a default implementation if necessary)public void setContext(SecurityContext context)
SecurityContextHolderStrategysetContext in interface SecurityContextHolderStrategycontext - to the new argument (should never be null, although implementations must check if
null has been passed and throw an IllegalArgumentException in such cases)