@Component(value="cuba_AnonymousSessionHolder") public class AnonymousSessionHolder extends java.lang.Object implements AppContext.Listener, org.springframework.core.Ordered
| Modifier and Type | Field and Description |
|---|---|
protected AuthenticationManager |
authenticationManager |
protected java.util.concurrent.locks.ReentrantReadWriteLock |
lock |
protected SecurityScopes |
securityScopes |
protected java.util.Map<java.lang.String,UserSession> |
sessions |
HIGHEST_PLATFORM_PRECEDENCE, LOWEST_PLATFORM_PRECEDENCE| Constructor and Description |
|---|
AnonymousSessionHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
applicationStarted()
Called by
AppContext after successful application startup and initialization. |
void |
applicationStopped()
Called by
AppContext before application shutdown. |
UserSession |
getAnonymousSession()
Method returns a UserSession saved for the default scope
|
UserSession |
getAnonymousSession(java.lang.String securityScope)
Method returns a UserSession saved for the given scope
|
int |
getOrder() |
void |
init() |
void |
initializeAnonymousSessions() |
protected UserSession |
loginAnonymous(java.lang.String securityScope) |
protected volatile java.util.Map<java.lang.String,UserSession> sessions
@Inject protected AuthenticationManager authenticationManager
@Inject protected SecurityScopes securityScopes
protected java.util.concurrent.locks.ReentrantReadWriteLock lock
public void applicationStarted()
AppContext.ListenerAppContext after successful application startup and initialization.applicationStarted in interface AppContext.Listenerpublic void applicationStopped()
AppContext.ListenerAppContext before application shutdown.applicationStopped in interface AppContext.Listenerpublic int getOrder()
getOrder in interface org.springframework.core.Orderedpublic UserSession getAnonymousSession()
public UserSession getAnonymousSession(java.lang.String securityScope)
securityScope - security scope namepublic void initializeAnonymousSessions()
protected UserSession loginAnonymous(java.lang.String securityScope) throws LoginException
LoginException@PostConstruct public void init()