Package com.priint.pubserver.session
Interface SessionManagerLocal
-
- All Superinterfaces:
SessionManagerRemote
public interface SessionManagerLocal extends SessionManagerRemote
Local interface for a session manager class defining method signatures for necessary session handling functions.
-
-
Field Summary
-
Fields inherited from interface com.priint.pubserver.session.SessionManagerRemote
REMOTE_ADDRESS_PROPERTY, SESSION_CLIENT_TYPE_COMET_BRIDGE, SESSION_CLIENT_TYPE_ISON, SESSION_CLIENT_TYPE_JOB, SESSION_CLIENT_TYPE_PRIINT_SUITE, SESSION_CLIENT_TYPE_PROPERTY, SESSION_CLIENT_TYPE_REST_SERVICE, SESSION_CLIENT_TYPE_WHITEBOARD, SESSION_LOGIN_PROPERTY, SESSION_TENANT_PROPERTY, SESSION_TRACE_ACTIVE_PROPERTY, USER_ADMIN_PATH, USER_INDEX_PATH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcloneSession(java.lang.String sessionId, long maxIdleTimeInMillis)Create a clone of the current session.java.lang.StringcreateAnonymousSession(java.lang.String name, long maxIdleTimeInMillis)Create a new and anonymous sessionorg.apache.shiro.subject.SubjectgetShiroSubject(java.lang.String sessionID)Gets the Shiro Subject for a session by its ID.org.apache.shiro.subject.SubjectgetSubjectOfSession(org.apache.shiro.session.Session session)Gets the Shiro Subject for a session.org.apache.shiro.session.Sessionlogin(java.lang.String login, java.lang.String password)Login a user by credentials and return the session.org.apache.shiro.session.SessionloginIfReady(java.lang.String login, java.lang.String password)Login a user by credentials and checking PubServerPhase if Ready ,returns the session.voidlogout(java.lang.String sessionID)End the session with the given ID.voidprolongSession(java.lang.String sessionID)Touch the session object to prolong the session with this ID.voidregisterSession(java.lang.String sessionId)Adds a session to the list of registered session.org.apache.shiro.session.SessionrequireSession(java.lang.String sessionId, java.lang.String componentName, boolean isSuperUser)Checks if a session with a given ID exists on the server and returns the Session object.voidunregisterSession(java.lang.String sessionId)Removes a session from the list of registered session.-
Methods inherited from interface com.priint.pubserver.session.SessionManagerRemote
checkAdminUser, getCometServerSessions, getPubServerSessionList, getSessionAttribute, getSessionList, getSessionUser, getSimpleSession, setSessionAttribute
-
-
-
-
Method Detail
-
requireSession
org.apache.shiro.session.Session requireSession(java.lang.String sessionId, java.lang.String componentName, boolean isSuperUser) throws InvalidSessionExceptionChecks if a session with a given ID exists on the server and returns the Session object.- Parameters:
sessionId- SessionIDcomponentName- Component name (like class name)isSuperUser- true: needs a session object with superuser privileges- Returns:
- session object associated with the current request
- Throws:
InvalidSessionException
-
getSubjectOfSession
org.apache.shiro.subject.Subject getSubjectOfSession(org.apache.shiro.session.Session session)
Gets the Shiro Subject for a session.Normally you should not handle shiro objects yourself.
- Parameters:
session-- Returns:
- subject (i.e. user object) associated with the current request
-
login
org.apache.shiro.session.Session login(java.lang.String login, java.lang.String password) throws InvalidSessionExceptionLogin a user by credentials and return the session.Missing or invalid credentials will lead to an InvalidSessionException.
- Parameters:
login-password-- Returns:
- session object associated with the current request
- Throws:
InvalidSessionException
-
loginIfReady
org.apache.shiro.session.Session loginIfReady(java.lang.String login, java.lang.String password) throws InvalidSessionExceptionLogin a user by credentials and checking PubServerPhase if Ready ,returns the session.Missing or invalid credentials will lead to an InvalidSessionException.
- Parameters:
login-password-- Returns:
- session object associated with the current request
- Throws:
InvalidSessionException
-
logout
void logout(java.lang.String sessionID)
End the session with the given ID.- Parameters:
sessionID-
-
registerSession
void registerSession(java.lang.String sessionId)
Adds a session to the list of registered session.- Parameters:
sessionId-
-
unregisterSession
void unregisterSession(java.lang.String sessionId)
Removes a session from the list of registered session.- Parameters:
sessionId-
-
createAnonymousSession
java.lang.String createAnonymousSession(java.lang.String name, long maxIdleTimeInMillis) throws SessionManagerExceptionCreate a new and anonymous session- Parameters:
name- Suffix to the automatically generated login namemaxIdleTimeInMillis- new session will expiry after this time- Returns:
- session id of anonymous session
- Throws:
SessionManagerException
-
cloneSession
java.lang.String cloneSession(java.lang.String sessionId, long maxIdleTimeInMillis) throws SessionManagerExceptionCreate a clone of the current session.- Parameters:
sessionId- id of session to be clonedmaxIdleTimeInMillis- new session will expiry after this time- Returns:
- session id of the session clone
- Throws:
SessionManagerException
-
getShiroSubject
org.apache.shiro.subject.Subject getShiroSubject(java.lang.String sessionID) throws InvalidSessionExceptionGets the Shiro Subject for a session by its ID.Normally you should not handle shiro objects yourself.
- Parameters:
sessionId- id of session Returns shiro Subject- Returns:
- session id of the session clone
- Throws:
InvalidSessionException
-
prolongSession
void prolongSession(java.lang.String sessionID) throws SessionManagerExceptionTouch the session object to prolong the session with this ID.- Parameters:
sessionID- ID of the session which we want to prolong.- Throws:
SessionManagerException
-
-