Class AbstractSessionManager
java.lang.Object
org.apache.shiro.session.mgt.AbstractSessionManager
- All Implemented Interfaces:
SessionManager
- Direct Known Subclasses:
AbstractNativeSessionManager
Base abstract class of the
SessionManager interface, enabling configuration of an
application-wide globalSessionTimeout. Default global session timeout is
30 minutes.- Since:
- 0.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDefault main session timeout value, equal to30minutes.protected static final longprotected static final longprotected static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the system-wide default time in milliseconds that any session may remain idle before expiring.voidsetGlobalSessionTimeout(long globalSessionTimeout) Sets the system-wide default time in milliseconds that any session may remain idle before expiring.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.shiro.session.mgt.SessionManager
getSession, start
-
Field Details
-
MILLIS_PER_SECOND
- See Also:
-
MILLIS_PER_MINUTE
- See Also:
-
MILLIS_PER_HOUR
- See Also:
-
DEFAULT_GLOBAL_SESSION_TIMEOUT
Default main session timeout value, equal to30minutes.- See Also:
-
-
Constructor Details
-
AbstractSessionManager
public AbstractSessionManager()
-
-
Method Details
-
getGlobalSessionTimeout
Returns the system-wide default time in milliseconds that any session may remain idle before expiring. This value is the main default for all sessions and may be overridden on a per-session basis by callingSubject.getSession().setTimeout(long)if so desired.- A negative return value means sessions never expire.
- A non-negative return value (0 or greater) means session timeout will occur as expected.
setGlobalSessionTimeout(long)method, the default value isDEFAULT_GLOBAL_SESSION_TIMEOUT.- Returns:
- the time in milliseconds that any session may remain idle before expiring.
-
setGlobalSessionTimeout
Sets the system-wide default time in milliseconds that any session may remain idle before expiring. This value is the main default for all sessions and may be overridden on a per-session basis by callingSubject.getSession().setTimeout(long)if so desired.- A negative return value means sessions never expire.
- A non-negative return value (0 or greater) means session timeout will occur as expected.
DEFAULT_GLOBAL_SESSION_TIMEOUT.- Parameters:
globalSessionTimeout- the time in milliseconds that any session may remain idle before expiring.
-