| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | attributes
Cache attribute (thread safe) |
| private final long | creationTime
When this session was created. |
| private String | id
A session identifier |
| private boolean | isNew
Is this session new. |
| private boolean | isValid
Is this Session valid. |
| private long | sessionTimeout
Timeout |
| private long | timestamp
Creation time stamp. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | |
| public ConcurrentMap | Returns: the attributes associated with this session.Return a |
| public Object | |
| public long | Returns: along specifying when this session was created, expressed in milliseconds since 1/1/1970 GMTReturns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT. |
| public String | |
| public long | Returns: a long representing the maximum idle time (in milliseconds) a session can be.Return a long representing the maximum idle time (in milliseconds) a session can be. |
| public long | |
| public boolean | Returns: true if the server has created a session, but the client has not yet joinedReturns |
| public boolean | |
| public Object | |
| public void | |
| protected void | |
| public void | setSessionTimeout(long
a long representing the maximum idle time (in milliseconds) a session can be. sessionTimeout)Set a long representing the maximum idle time (in milliseconds) a session can be. |
| public void | setTimestamp(long
a long representing when the session was accessed the last time timestamp)Set the timestamp when this session was accessed the last time. |
| public void |
| attributes | back to summary |
|---|---|
| private final ConcurrentMap<String, Object> attributes Cache attribute (thread safe) | |
| creationTime | back to summary |
|---|---|
| private final long creationTime When this session was created. | |
| id | back to summary |
|---|---|
| private String id A session identifier | |
| isNew | back to summary |
|---|---|
| private boolean isNew Is this session new. | |
| isValid | back to summary |
|---|---|
| private boolean isValid Is this Session valid. | |
| sessionTimeout | back to summary |
|---|---|
| private long sessionTimeout Timeout | |
| timestamp | back to summary |
|---|---|
| private long timestamp Creation time stamp. | |
| Session | back to summary |
|---|---|
| public Session() | |
| Session | back to summary |
|---|---|
| public Session(String id) Create a new session using a session identifier
| |
| access | back to summary |
|---|---|
| public long access() Updates the "last accessed" timestamp with the current time.
| |
| attributes | back to summary |
|---|---|
| public ConcurrentMap Return a
| |
| getAttribute | back to summary |
|---|---|
| public Object getAttribute(String key) Return an attribute.
| |
| getCreationTime | back to summary |
|---|---|
| public long getCreationTime() Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
| |
| getIdInternal | back to summary |
|---|---|
public String getIdInternal()
| |
| getSessionTimeout | back to summary |
|---|---|
| public long getSessionTimeout() Return a long representing the maximum idle time (in milliseconds) a session can be.
| |
| getTimestamp | back to summary |
|---|---|
public long getTimestamp()
| |
| isNew | back to summary |
|---|---|
| public boolean isNew() Returns
| |
| isValid | back to summary |
|---|---|
| public boolean isValid() Is the current Session valid?
| |
| removeAttribute | back to summary |
|---|---|
| public Object removeAttribute(String key) Remove an attribute.
| |
| setAttribute | back to summary |
|---|---|
| public void setAttribute(String key, Object value) Add an attribute to this session. | |
| setIdInternal | back to summary |
|---|---|
| protected void setIdInternal(String id) Sets the session identifier for this session. | |
| setSessionTimeout | back to summary |
|---|---|
| public void setSessionTimeout(long sessionTimeout) Set a long representing the maximum idle time (in milliseconds) a session can be.
| |
| setTimestamp | back to summary |
|---|---|
| public void setTimestamp(long timestamp) Set the timestamp when this session was accessed the last time.
| |
| setValid | back to summary |
|---|---|
| public void setValid(boolean isValid) Set this object as validated. | |