Spring Security Framework

org.springframework.security.context
Class InheritableThreadLocalSecurityContextHolderStrategy

java.lang.Object
  extended by org.springframework.security.context.InheritableThreadLocalSecurityContextHolderStrategy
All Implemented Interfaces:
SecurityContextHolderStrategy

public class InheritableThreadLocalSecurityContextHolderStrategy
extends Object
implements SecurityContextHolderStrategy

An InheritableThreadLocal-based implementation of SecurityContextHolderStrategy.

Version:
$Id$
Author:
Ben Alex
See Also:
ThreadLocal, HttpSessionContextIntegrationFilter

Constructor Summary
InheritableThreadLocalSecurityContextHolderStrategy()
           
 
Method Summary
 void clearContext()
          Clears the current context.
 SecurityContext getContext()
          Obtains the current context.
 void setContext(SecurityContext context)
          Sets the current context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InheritableThreadLocalSecurityContextHolderStrategy

public InheritableThreadLocalSecurityContextHolderStrategy()
Method Detail

clearContext

public void clearContext()
Description copied from interface: SecurityContextHolderStrategy
Clears the current context.

Specified by:
clearContext in interface SecurityContextHolderStrategy

getContext

public SecurityContext getContext()
Description copied from interface: SecurityContextHolderStrategy
Obtains the current context.

Specified by:
getContext in interface SecurityContextHolderStrategy
Returns:
a context (never null - create a default implementation if necessary)

setContext

public void setContext(SecurityContext context)
Description copied from interface: SecurityContextHolderStrategy
Sets the current context.

Specified by:
setContext in interface SecurityContextHolderStrategy
Parameters:
context - to the new argument (should never be null, although implementations must check if null has been passed and throw an IllegalArgumentException in such cases)

Spring Security Framework

Copyright © 2004-2010 SpringSource, Inc. All Rights Reserved.