org.springframework.integration.security
Class StackBasedSecurityContextHolderStrategy
java.lang.Object
org.springframework.integration.security.StackBasedSecurityContextHolderStrategy
- All Implemented Interfaces:
- org.springframework.security.context.SecurityContextHolderStrategy
public class StackBasedSecurityContextHolderStrategy
- extends java.lang.Object
- implements org.springframework.security.context.SecurityContextHolderStrategy
Covers scenarios where direct channels are used and ensures that an existing
SecurityContext
is not unintentionally cleared
- Author:
- Jonas Partner
Field Summary |
private static java.lang.ThreadLocal<java.util.LinkedList<org.springframework.security.context.SecurityContext>> |
contextHolder
|
private org.apache.commons.logging.Log |
logger
|
Method Summary |
void |
clearContext()
|
void |
clearStack()
|
org.springframework.security.context.SecurityContext |
getContext()
|
protected java.util.LinkedList<org.springframework.security.context.SecurityContext> |
getStackForThread()
|
void |
setContext(org.springframework.security.context.SecurityContext context)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private org.apache.commons.logging.Log logger
contextHolder
private static java.lang.ThreadLocal<java.util.LinkedList<org.springframework.security.context.SecurityContext>> contextHolder
StackBasedSecurityContextHolderStrategy
public StackBasedSecurityContextHolderStrategy()
clearContext
public void clearContext()
- Specified by:
clearContext
in interface org.springframework.security.context.SecurityContextHolderStrategy
getContext
public org.springframework.security.context.SecurityContext getContext()
- Specified by:
getContext
in interface org.springframework.security.context.SecurityContextHolderStrategy
setContext
public void setContext(org.springframework.security.context.SecurityContext context)
- Specified by:
setContext
in interface org.springframework.security.context.SecurityContextHolderStrategy
getStackForThread
protected java.util.LinkedList<org.springframework.security.context.SecurityContext> getStackForThread()
clearStack
public void clearStack()