class Session
extends java.lang.Object
SecurityCache
that is
in effect when the session is created, is kept here. This allows for a safe
fading out of all older generations of SecurityCache
as soon
as the last session referring to the old SecurityCache
goes
away.Modifier and Type | Field and Description |
---|---|
private SecurityCache |
cache
security cache in effect by the time of session creation
|
private SecurityContext |
context
security context created for this session
|
private java.lang.Object |
id
An object that serves as an ID of this connection
|
private long |
timestamp
Timestamp of when this session was created.
|
Constructor and Description |
---|
Session(java.lang.Object id,
SecurityCache cache)
Package private constructor for client side Session.
|
Session(java.lang.Object id,
SecurityCache cache,
SecurityContext context)
Package private constructor for server side Session.
|
Modifier and Type | Method and Description |
---|---|
(package private) SecurityCache |
getCache()
Gets the security cache this session is bound to.
|
(package private) SecurityContext |
getSecurityContext()
Gets the session security context.
|
(package private) java.lang.Object |
getSessionId()
Gets the session ID object.
|
(package private) long |
getTimeStamp()
Obtain the timestamp of when this session was created.
|
(package private) boolean |
hasContext(SecurityContext context)
Checks whether this session was created with the specified security
context.
|
private java.lang.Object id
private SecurityContext context
private SecurityCache cache
private long timestamp
Session(java.lang.Object id, SecurityCache cache)
id
- session ID, normally the socket that maps the connectioncache
- reference to a SecurityCache
Session(java.lang.Object id, SecurityCache cache, SecurityContext context)
id
- session ID, normally the socket that maps the connectioncache
- reference to a SecurityCache
context
- security context to be associated with the sessionboolean hasContext(SecurityContext context)
context
- security context to checktrue
if security context matchesjava.lang.Object getSessionId()
SecurityContext getSecurityContext()
SecurityContext
SecurityCache getCache()
SecurityCache
long getTimeStamp()