Spring Security Framework

org.springframework.security.context
Interface SecurityContextHolderStrategy

All Known Implementing Classes:
GlobalSecurityContextHolderStrategy, InheritableThreadLocalSecurityContextHolderStrategy, ThreadLocalSecurityContextHolderStrategy

public interface SecurityContextHolderStrategy

A strategy for storing security context information against a thread.

The preferred strategy is loaded by SecurityContextHolder.

Version:
$Id$
Author:
Ben Alex

Method Summary
 void clearContext()
          Clears the current context.
 SecurityContext getContext()
          Obtains the current context.
 void setContext(SecurityContext context)
          Sets the current context.
 

Method Detail

clearContext

void clearContext()
Clears the current context.


getContext

SecurityContext getContext()
Obtains the current context.

Returns:
a context (never null - create a default implementation if necessary)

setContext

void setContext(SecurityContext context)
Sets the current context.

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.