org.apache.shiro.session.mgt
Class DefaultSessionKey
java.lang.Object
org.apache.shiro.session.mgt.DefaultSessionKey
- All Implemented Interfaces:
- Serializable, SessionKey
public class DefaultSessionKey
- extends Object
- implements SessionKey, Serializable
Default implementation of the SessionKey
interface, which allows setting and retrieval of a concrete
sessionId
that the SessionManager
implementation can use to look up a
Session
instance.
- Since:
- 1.0
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSessionKey
public DefaultSessionKey()
DefaultSessionKey
public DefaultSessionKey(Serializable sessionId)
setSessionId
public void setSessionId(Serializable sessionId)
getSessionId
public Serializable getSessionId()
- Description copied from interface:
SessionKey
- Returns the id of the session to acquire.
Acquiring sessions by ID only is a suitable strategy when sessions are natively managed by Shiro directly.
For example, the Servlet specification does not have an API that allows session acquisition by session ID, so
the session ID alone is not sufficient for ServletContainer-based SessionManager implementations.
- Specified by:
getSessionId
in interface SessionKey
- Returns:
- the id of the session to acquire.
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.