|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.auth.SessionManager
public class SessionManager
This is the JON Server's own session ID generator. It is outside any container-provided session mechanism. Its sole
purpose is to provide session IDs to logged in Subjects. It will timeout those sessions regardless of any
container-provided session-timeout mechanism.
This object is a singleton.
| Method Summary | |
|---|---|
static SessionManager |
getInstance()
Return the singleton object. |
Subject |
getOverlord()
|
int |
getSessionIdFromUsername(java.lang.String username)
Lookup and return the session ID that is associated with the given username. |
Subject |
getSubject(int sessionId)
Returns the Subject associated with the given session id. |
void |
invalidate(int sessionId)
Invalidates the session associated with the given session ID. |
int |
put(Subject subject)
Associates a Subject with a new session id. |
int |
put(Subject subject,
long timeout)
Associates a Subject with a new session id with the given session timeout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static SessionManager getInstance()
SessionManagerpublic int put(Subject subject)
Subject with a new session id. The new session will use the
default timeout.
subject -
public int put(Subject subject,
long timeout)
Subject with a new session id with the given session timeout.
subject - timeout - the timeout for the session, in milliseconds
public int getSessionIdFromUsername(java.lang.String username)
throws SessionNotFoundException,
SessionTimeoutException
username - the username of the Subject that has a valid session
SessionNotFoundException
SessionTimeoutException
public Subject getSubject(int sessionId)
throws SessionNotFoundException,
SessionTimeoutException
Subject associated with the given session id.
sessionId - The session id
Subject associated with the session id
SessionNotFoundException
SessionTimeoutExceptionpublic void invalidate(int sessionId)
sessionId - session id to invalidatepublic Subject getOverlord()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||