public class SessionService extends BaseService
_serviceName| Modifier and Type | Method and Description |
|---|---|
void |
doRefresh() |
static SessionService |
getInstance()
Get the single instance of SessionService.
|
SessionData |
getPublicSession()
Get the public session from the session hash table.
|
SessionData |
getRegisteredSession(java.lang.String sessionId)
Get a registered session from the session hash table.
|
boolean |
isSessionRegistered(java.lang.String sessionId)
Check if a session is registered in the session hash table.
|
boolean |
refreshable() |
void |
registerSession(SessionData sessionData)
Register a session in the session hash table.
|
void |
registerSession(java.lang.String sessionId,
java.lang.String userName,
java.lang.String[] groupNames,
java.lang.String password,
java.lang.String name)
Register a session in the session hash table.
|
void |
stop() |
void |
touchSession(java.lang.String sessionId)
Keep a session active by updating its last accessed time.
|
void |
unRegisterAllSessions()
Unregister all sessions from the session hash table except the public session.
|
void |
unRegisterSession(java.lang.String sessionId)
Unregister a session from the session hash table.
|
boolean |
validateSession(java.lang.String sessionId)
Check if a session is registered in the session hash table.
|
void |
validateSession(java.io.Writer out,
javax.servlet.http.HttpServletResponse response,
java.lang.String sessionId)
Check if a session is registered in the session hash table.
|
refreshpublic static SessionService getInstance()
public boolean refreshable()
refreshable in class BaseServicepublic void doRefresh()
throws ServiceException
doRefresh in class BaseServiceServiceExceptionpublic void stop()
throws ServiceException
stop in class BaseServiceServiceExceptionpublic void registerSession(java.lang.String sessionId,
java.lang.String userName,
java.lang.String[] groupNames,
java.lang.String password,
java.lang.String name)
throws ServiceException
sessionId - the ID of the session to registeruserName - the user name of the sessiongroupNames - the group names for the sessionpassword - the password for the sessionServiceExceptionpublic void registerSession(SessionData sessionData) throws ServiceException
sessionData - the session data object to add to the session hashServiceExceptionpublic void unRegisterSession(java.lang.String sessionId)
sessionId - the id of the session to remove.public void unRegisterAllSessions()
sessionId - the id of the session to remove.public boolean isSessionRegistered(java.lang.String sessionId)
sessionId - the id of the session to look for.public void validateSession(java.io.Writer out,
javax.servlet.http.HttpServletResponse response,
java.lang.String sessionId)
throws java.io.IOException
out - the output stream to write to.sessionId - the id of the session to look for.java.io.IOExceptionpublic boolean validateSession(java.lang.String sessionId)
sessionId - the id of the session to look for.public SessionData getRegisteredSession(java.lang.String sessionId)
sessionId - the id of the session to retrieve.public SessionData getPublicSession()
public void touchSession(java.lang.String sessionId)
sessionId - the id of the session to update.Copyright © 2020 Regents of the University of California. All Rights Reserved.