Session.getTimeout

Returns the time in milliseconds that the session session may remain idle before expiring. <ul> <li>A negative return value means the session will never expire.</li> <li>A non-negative return value (0 or greater) means the session expiration will occur if idle for that length of time.</li> </ul> <b>*Note:</b> if you are used to the {@code HttpSession}'s {@code getMaxInactiveInterval()} method, the scale on this method is different: Shiro Sessions use millisecond values for timeout whereas {@code HttpSession.getMaxInactiveInterval} uses seconds. Always use millisecond values with Shiro sessions.

@return the time in milliseconds the session may remain idle before expiring. @throws InvalidSessionException if the session has been stopped or expired prior to calling this method.

interface Session
long
getTimeout
()

Meta