Class TestSecurityContextHolderStrategyAdapter
- java.lang.Object
- 
- org.springframework.security.test.context.TestSecurityContextHolderStrategyAdapter
 
- 
- All Implemented Interfaces:
- SecurityContextHolderStrategy
 
 public final class TestSecurityContextHolderStrategyAdapter extends java.lang.Object implements SecurityContextHolderStrategy 
- 
- 
Constructor SummaryConstructors Constructor Description TestSecurityContextHolderStrategyAdapter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearContext()Clears the current context.SecurityContextcreateEmptyContext()Creates a new, empty context implementation, for use by SecurityContextRepository implementations, when creating a new context for the first time.SecurityContextgetContext()Obtains the current context.voidsetContext(SecurityContext context)Sets the current context.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.springframework.security.core.context.SecurityContextHolderStrategygetDeferredContext, setDeferredContext
 
- 
 
- 
- 
- 
Method Detail- 
clearContextpublic void clearContext() Description copied from interface:SecurityContextHolderStrategyClears the current context.- Specified by:
- clearContextin interface- SecurityContextHolderStrategy
 
 - 
getContextpublic SecurityContext getContext() Description copied from interface:SecurityContextHolderStrategyObtains the current context.- Specified by:
- getContextin interface- SecurityContextHolderStrategy
- Returns:
- a context (never null- create a default implementation if necessary)
 
 - 
setContextpublic void setContext(SecurityContext context) Description copied from interface:SecurityContextHolderStrategySets the current context.- Specified by:
- setContextin interface- SecurityContextHolderStrategy
- Parameters:
- context- to the new argument (should never be- null, although implementations must check if- nullhas been passed and throw an- IllegalArgumentExceptionin such cases)
 
 - 
createEmptyContextpublic SecurityContext createEmptyContext() Description copied from interface:SecurityContextHolderStrategyCreates a new, empty context implementation, for use by SecurityContextRepository implementations, when creating a new context for the first time.- Specified by:
- createEmptyContextin interface- SecurityContextHolderStrategy
- Returns:
- the empty context.
 
 
- 
 
-