@ThreadSafe @Singleton public class ScopeSessionManager extends AbstractGlobalSingleton
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_DESTROY_ALL_SESSIONS_ON_SCOPE_END |
static boolean |
DEFAULT_END_ALL_SESSIONS_ON_SCOPE_END |
m_aRWLock| Constructor and Description |
|---|
ScopeSessionManager()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAnySession() |
void |
destroyAllSessions()
Destroy all known session scopes.
|
com.helger.commons.collection.impl.ICommonsList<ISessionScope> |
getAllSessionScopes() |
static ScopeSessionManager |
getInstance() |
int |
getSessionCount() |
ISessionScope |
getSessionScopeOfID(String sScopeID)
Get the session scope with the specified ID.
|
boolean |
isDestroyAllSessionsOnScopeEnd() |
boolean |
isEndAllSessionsOnScopeEnd() |
protected void |
onDestroy(IScope aScopeInDestruction)
Called when this singleton is destroyed.
|
void |
onScopeBegin(ISessionScope aSessionScope)
Register the passed session scope in the internal map, call the
#initScope() method and finally invoke the SPIs for
the new scope. |
void |
onScopeEnd(ISessionScope aSessionScope)
Close the passed session scope gracefully.
|
com.helger.commons.state.EChange |
setDestroyAllSessionsOnScopeEnd(boolean bDestroyAllSessionsOnScopeEnd) |
com.helger.commons.state.EChange |
setEndAllSessionsOnScopeEnd(boolean bEndAllSessionsOnScopeEnd) |
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiatedgetAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, toString, writeAbstractSingletonFieldspublic static final boolean DEFAULT_DESTROY_ALL_SESSIONS_ON_SCOPE_END
public static final boolean DEFAULT_END_ALL_SESSIONS_ON_SCOPE_END
@Deprecated @UsedViaReflection public ScopeSessionManager()
@Nonnull public static ScopeSessionManager getInstance()
@Nullable public ISessionScope getSessionScopeOfID(@Nullable String sScopeID)
sScopeID - The ID to be resolved. May be null.null if no such scope exists.public void onScopeBegin(@Nonnull ISessionScope aSessionScope)
#initScope() method and finally invoke the SPIs for
the new scope.aSessionScope - The session scope that was just created. May not be
null.public void onScopeEnd(@Nonnull ISessionScope aSessionScope)
aSessionScope - The session scope to be ended. May not be null.public boolean containsAnySession()
true if at least one session is present,
false otherwise@Nonnegative public int getSessionCount()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<ISessionScope> getAllSessionScopes()
null, mutable copy of all managed session
scopes.public void destroyAllSessions()
public boolean isDestroyAllSessionsOnScopeEnd()
@Nonnull public com.helger.commons.state.EChange setDestroyAllSessionsOnScopeEnd(boolean bDestroyAllSessionsOnScopeEnd)
public boolean isEndAllSessionsOnScopeEnd()
@Nonnull public com.helger.commons.state.EChange setEndAllSessionsOnScopeEnd(boolean bEndAllSessionsOnScopeEnd)
protected void onDestroy(@Nonnull IScope aScopeInDestruction)
AbstractSingletonfalse
, "inDestruction" is true and "isDestroyed" is
false.onDestroy in class AbstractSingletonaScopeInDestruction - The scope in destruction. Never null.Copyright © 2016–2019 Philip Helger. All rights reserved.