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 the SessionManager
interface, enabling configuration of an
application-wide globalSessionTimeout
. Default global session timeout is
30
minutes.
- Since:
- 0.1
Method Summary |
long |
getGlobalSessionTimeout()
Returns the system-wide default time in milliseconds that any session may remain idle before expiring. |
void |
setGlobalSessionTimeout(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, wait |
MILLIS_PER_SECOND
protected static final long MILLIS_PER_SECOND
- See Also:
- Constant Field Values
MILLIS_PER_MINUTE
protected static final long MILLIS_PER_MINUTE
- See Also:
- Constant Field Values
MILLIS_PER_HOUR
protected static final long MILLIS_PER_HOUR
- See Also:
- Constant Field Values
DEFAULT_GLOBAL_SESSION_TIMEOUT
public static final long DEFAULT_GLOBAL_SESSION_TIMEOUT
- Default main session timeout value, equal to
30
minutes.
- See Also:
- Constant Field Values
AbstractSessionManager
public AbstractSessionManager()
getGlobalSessionTimeout
public 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 calling
Subject.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.
Unless overridden via the setGlobalSessionTimeout(long)
method, the default value is
DEFAULT_GLOBAL_SESSION_TIMEOUT
.
- Returns:
- the time in milliseconds that any session may remain idle before expiring.
setGlobalSessionTimeout
public 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 calling
Subject.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.
Unless overridden by calling this method, the default value is DEFAULT_GLOBAL_SESSION_TIMEOUT
.
- Parameters:
globalSessionTimeout
- the time in milliseconds that any session may remain idel before expiring.
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.