![]() |
Quadcap Embeddable Server |
Inheritance diagram for com.quadcap.http.server22.HSession:

javax.servlet.http.HttpSession interface.
Definition at line 58 of file HSession.java.
Public Member Functions | |
| HSession (WebApplication app, String sessionId, int maxInactiveInterval) | |
| Construct a new session object. | |
| String | getId () |
| Returns the identifier assigned to this session. | |
| HttpSessionContext | getSessionContext () |
| Returns the context in which this session is bound. | |
| long | getCreationTime () |
| Returns the time at which this session representation was created, in milliseconds since midnight, January 1, 1970 UTC. | |
| long | getLastAccessedTime () |
| Returns the last time the client sent a request carrying the identifier assigned to the session. | |
| void | invalidate () |
| Causes this representation of the session to be invalidated and removed from its context. | |
| void | setAttribute (String name, Object value) |
| Binds the specified object into the session's application layer data with the given name. | |
| Object | getAttribute (String name) |
| Returns the object bound to the given name in the session's application layer data. | |
| void | removeAttribute (String name) |
| Removes the object bound to the given name in the session's application layer data. | |
| Enumeration | getAttributeNames () |
| Return an enumeration of the names of objects in the session's application layer data. | |
| String[] | getValueNames () |
| Returns an array of the names of all the application layer data objects bound into the session. | |
| Object | getValue (String name) |
| void | putValue (String name, Object value) |
| void | removeValue (String name) |
| boolean | isNew () |
| A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. | |
| int | getMaxInactiveInterval () |
| void | setMaxInactiveInterval (int ivl) |
Package Functions | |
| boolean | isValid () |
| ---- Package-private implementation ----- | |
| void | setNotNew () |
| void | updateLastAccess () |
Package Attributes | |
| WebApplication | app |
| String | sessionId |
| boolean | valid = true |
| long | creationTime = new Date().getTime() |
| long | lastAccessTime = creationTime |
| int | maxInactiveInterval |
| Hashtable | appData = new Hashtable() |
| boolean | newSession = true |
|
||||||||||||||||
|
Construct a new session object.
Definition at line 74 of file HSession.java. |
|
|
Returns the object bound to the given name in the session's application layer data. Returns null if there is no such binding.
Definition at line 205 of file HSession.java. References com.quadcap.http.server22.HSession.appData, com.quadcap.http.server22.HSession.getAttribute(), and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HSession.getAttribute(). |
|
|
Return an enumeration of the names of objects in the session's application layer data.
Definition at line 242 of file HSession.java. References com.quadcap.http.server22.HSession.appData, and com.quadcap.http.server22.HSession.valid. |
|
|
Returns the time at which this session representation was created, in milliseconds since midnight, January 1, 1970 UTC.
Definition at line 119 of file HSession.java. References com.quadcap.http.server22.HSession.creationTime, and com.quadcap.http.server22.HSession.valid. |
|
|
Returns the identifier assigned to this session. An HttpSession's identifier is a unique string that is created and maintained by HttpSessionContext.
Definition at line 91 of file HSession.java. References com.quadcap.http.server22.HSession.sessionId, and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HttpRequest.getRequestedSessionId(), com.quadcap.http.server22.HttpRequest.getSession(), and com.quadcap.http.server22.WebApplication.removeSession(). |
|
|
Returns the last time the client sent a request carrying the identifier assigned to the session. Time is expressed as milliseconds since midnight, January 1, 1970 UTC. Application level operations, such as getting or setting a value associated with the session, does not affect the access time. This information is particularly useful in session management policies. For example,
Definition at line 146 of file HSession.java. References com.quadcap.http.server22.HSession.lastAccessTime, and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.WebApplication.expireSessions(). |
|
|
Definition at line 310 of file HSession.java. References com.quadcap.http.server22.HSession.maxInactiveInterval, and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.WebApplication.expireSessions(). |
|
|
Returns the context in which this session is bound.
Definition at line 104 of file HSession.java. |
|
|
Definition at line 273 of file HSession.java. References com.quadcap.http.server22.HSession.getValue(). Referenced by com.quadcap.http.server22.HSession.getValue(). |
|
|
Returns an array of the names of all the application layer data objects bound into the session. For example, if you want to delete all of the data objects bound into the session, use this method to obtain their names.
Definition at line 259 of file HSession.java. References com.quadcap.http.server22.HSession.appData, and com.quadcap.http.server22.HSession.valid. |
|
|
Causes this representation of the session to be invalidated and removed from its context.
Definition at line 158 of file HSession.java. References com.quadcap.http.server22.HSession.app, com.quadcap.http.server22.HSession.appData, com.quadcap.http.server22.WebApplication.removeSession(), com.quadcap.http.server22.HSession.removeValue(), and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.WebApplication.expireSessions(), and com.quadcap.http.server22.WebApplication.shutdown(). |
|
|
A session is considered to be "new" if it has been created by the server, but the client has not yet acknowledged joining the session. For example, if the server supported only cookie-based sessions and the client had completely disabled the use of cookies, then calls to HttpServletRequest.getSession() would always return "new" sessions.
Definition at line 305 of file HSession.java. References com.quadcap.http.server22.HSession.newSession, and com.quadcap.http.server22.HSession.valid. |
|
|
---- Package-private implementation -----
Definition at line 323 of file HSession.java. References com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HttpRequest.isRequestedSessionIdValid(). |
|
||||||||||||
|
Definition at line 280 of file HSession.java. References com.quadcap.http.server22.HSession.putValue(). Referenced by com.quadcap.http.server22.HSession.putValue(). |
|
|
Removes the object bound to the given name in the session's application layer data. Does nothing if there is no object bound to the given name. The value that implements the HttpSessionBindingListener interface will call its valueUnbound() method.
Definition at line 221 of file HSession.java. References com.quadcap.http.server22.HSession.appData, com.quadcap.http.server22.HSession.removeAttribute(), and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HSession.removeAttribute(). |
|
|
Definition at line 287 of file HSession.java. References com.quadcap.http.server22.HSession.removeValue(). Referenced by com.quadcap.http.server22.HSession.invalidate(), and com.quadcap.http.server22.HSession.removeValue(). |
|
||||||||||||
|
Binds the specified object into the session's application layer data with the given name. Any existing binding with the same name is replaced. New (or existing) values that implement the HttpSessionBindingListener interface will call its valueBound() method.
Definition at line 183 of file HSession.java. References com.quadcap.http.server22.HSession.appData, com.quadcap.http.server22.HSession.setAttribute(), and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HSession.setAttribute(). |
|
|
Definition at line 314 of file HSession.java. References com.quadcap.http.server22.HSession.setMaxInactiveInterval(), and com.quadcap.http.server22.HSession.valid. Referenced by com.quadcap.http.server22.HSession.setMaxInactiveInterval(). |
|
|
Definition at line 324 of file HSession.java. References com.quadcap.http.server22.HSession.newSession. |
|
|
Definition at line 325 of file HSession.java. References com.quadcap.http.server22.HSession.lastAccessTime. Referenced by com.quadcap.http.server22.HttpRequest.getSession(). |
|
|
Definition at line 59 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.invalidate(). |
|
|
|
Definition at line 62 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.getCreationTime(). |
|
|
Definition at line 63 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.getLastAccessedTime(), and com.quadcap.http.server22.HSession.updateLastAccess(). |
|
|
Definition at line 64 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.getMaxInactiveInterval(). |
|
|
Definition at line 66 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.isNew(), and com.quadcap.http.server22.HSession.setNotNew(). |
|
|
Definition at line 60 of file HSession.java. Referenced by com.quadcap.http.server22.HSession.getId(). |
|