-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
ThreadLocalSessionHolder
public interface SessionHolder extends java.io.SerializableHolder for a session.- Author:
- harald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SessiongetSession()Gets the session.
The threadlocal session is returned if the session is null.SessionInfogetSessionInfo()The SessionInfo extends the UserInfo by a SecurityManager.intgetSessionInstanceNumber()Gets the unique instance number of the Session.booleanisSessionImmutable()Returns whether the session is immutable.booleanisSessionThreadLocal()Returns whether the session is thread local.voidsetSession(Session session)Sets the session.voidsetSessionImmutable(boolean sessionImmutable)Sets the session to immutable.
-
-
-
Method Detail
-
getSession
Session getSession()
Gets the session.
The threadlocal session is returned if the session is null.- Returns:
- the session.
-
setSession
void setSession(Session session)
Sets the session.- Parameters:
session- the session, null if threadlocal
-
isSessionThreadLocal
boolean isSessionThreadLocal()
Returns whether the session is thread local.- Returns:
- true if threadlocal
-
setSessionImmutable
void setSessionImmutable(boolean sessionImmutable)
Sets the session to immutable.- Parameters:
sessionImmutable- true if session cannot be changed anymore
-
isSessionImmutable
boolean isSessionImmutable()
Returns whether the session is immutable.- Returns:
- true if immutable
-
getSessionInfo
SessionInfo getSessionInfo()
The SessionInfo extends the UserInfo by a SecurityManager.- Returns:
- the SessionInfo associated to the Db.
-
getSessionInstanceNumber
int getSessionInstanceNumber()
Gets the unique instance number of the Session.Delegating
getSession().getInstanceNumber()togetSessionInstanceNumberallows to override getSession and dynamically retrieve the thread's session without changing the sorting order.- Returns:
- the session's instance number
-
-