Package com.priint.pubserver.session
Interface SessionManagerLocal
- All Superinterfaces:
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
Modifier and TypeMethodDescriptioncloneSession(String sessionId, long maxIdleTimeInMillis) Create a clone of the current session.createAnonymousSession(String name, long maxIdleTimeInMillis) Create a new and anonymous sessionorg.apache.shiro.subject.SubjectgetShiroSubject(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 a user by credentials and return the session.org.apache.shiro.session.SessionloginIfReady(String login, String password) Login a user by credentials and checking PubServerPhase if Ready ,returns the session.voidEnd the session with the given ID.voidprolongSession(String sessionID) Touch the session object to prolong the session with this ID.voidregisterSession(String sessionId) Adds a session to the list of registered session.org.apache.shiro.session.SessionrequireSession(String sessionId, String componentName, boolean isSuperUser) Checks if a session with a given ID exists on the server and returns the Session object.voidunregisterSession(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 Details
-
requireSession
org.apache.shiro.session.Session requireSession(String sessionId, String componentName, boolean isSuperUser) throws InvalidSessionException Checks 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(String login, String password) throws InvalidSessionException Login 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(String login, String password) throws InvalidSessionException Login 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
End the session with the given ID.- Parameters:
sessionID-
-
registerSession
Adds a session to the list of registered session.- Parameters:
sessionId-
-
unregisterSession
Removes a session from the list of registered session.- Parameters:
sessionId-
-
createAnonymousSession
Create 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
Create 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
Gets 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
Touch the session object to prolong the session with this ID.- Parameters:
sessionID- ID of the session which we want to prolong.- Throws:
SessionManagerException
-