Package org.apache.shiro.session.mgt
Class AbstractSessionManager
- java.lang.Object
- 
- org.apache.shiro.session.mgt.AbstractSessionManager
 
- 
- All Implemented Interfaces:
- SessionManager
 - Direct Known Subclasses:
- AbstractNativeSessionManager
 
 public abstract class AbstractSessionManager extends Object implements SessionManager Base abstract class of theSessionManagerinterface, enabling configuration of an application-wideglobalSessionTimeout. Default global session timeout is30minutes.- Since:
- 0.1
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longDEFAULT_GLOBAL_SESSION_TIMEOUTDefault main session timeout value, equal to30minutes.protected static longMILLIS_PER_HOURprotected static longMILLIS_PER_MINUTEprotected static longMILLIS_PER_SECOND
 - 
Constructor SummaryConstructors Constructor Description AbstractSessionManager()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetGlobalSessionTimeout()Returns 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.shiro.session.mgt.SessionManagergetSession, start
 
- 
 
- 
- 
- 
Field Detail- 
MILLIS_PER_SECONDprotected static final long MILLIS_PER_SECOND - See Also:
- Constant Field Values
 
 - 
MILLIS_PER_MINUTEprotected static final long MILLIS_PER_MINUTE - See Also:
- Constant Field Values
 
 - 
MILLIS_PER_HOURprotected static final long MILLIS_PER_HOUR - See Also:
- Constant Field Values
 
 - 
DEFAULT_GLOBAL_SESSION_TIMEOUTpublic static final long DEFAULT_GLOBAL_SESSION_TIMEOUT Default main session timeout value, equal to30minutes.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getGlobalSessionTimeoutpublic long 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.
 
 - 
setGlobalSessionTimeoutpublic void setGlobalSessionTimeout(long globalSessionTimeout) 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.
 
 
- 
 
-