|
Class: HTTPSession
Object
|
+--HTTPSession
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Server
- Version:
- rev:
1.12
date: 2010/02/02 11:12:41
- user: cg
- file: HTTPSession.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
- Author:
- James (james@kokxnix)
Summary:
This class provides a way to store state across multiple page requests. It is achieved through
the use of a 'session cookie' that is transported between the client and the server. The cookie's
value uniquely identifes a session (this value is generated from via the UUID class) and provides
a Dictionary like interface to access the state associated with the session.
The state itself is stored in a Dictionary in the HTTPServer. Every hour a job
is run that removes all the sessions that have timed-out. This happens when there has
been no closure to a session. Sessions can also be removed explicitly.
Limitations:
As yet there is no support for URL rewrite functionality.
[instance variables:]
[class variables:]
constants
-
defaultMaxInactiveInterval
-
how long may a session be inactive until it is removed
instance creation
-
cookie: aHTTPCookie server: aHTTPServer
-
Checks the HTTP server if a HTTP session has been created with the same
id as the cookie sent. If so return this session with the cookie in hand
(the expiration could have changed)
<return: HTTPSession>
-
new
-
accessing
-
at: aKey
-
-
at: aSymbol ifAbsent: anObject
-
-
at: aSymbol ifAbsentPut: aBlock
-
-
at: aSymbol ifPresent: aOneArgBlock
-
-
at: aKey put: aSymbol
-
-
cookie
-
-
cookie: something
-
-
cookie: cookieArg server: serverArg
-
-
expiration
-
-
isNew
-
-
lastAccessedTime
-
-
lastAccessedTime: something
-
-
removeKey: aKey
-
actions
-
invalidate
-
Invalidates the session and any object bound to it
-
makeActive
-
The session has been accepted by the client
initialization
-
initialize
-
seconds
jsp-specific api
-
getAttributeNames
-
<return: OrderedCollection>
-
getId
-
Returns the id of the session which is the value of the cookie
<return: String>
-
getLastAccessedTime
-
<return: Timestamp>
-
getMaxInactiveInterval
-
Returns the maximum time interval that the this session will be alive for
<return: Time>
-
removeAttribute: aString
-
-
setAttribute: aString to: anObject
-
-
setMaxInactiveInterval: aValue
-
Sets the maximum time interval that the this session will be alive for in SECONDS
queries
-
isValid
-
Return true if the session is a valid session
<return: Boolean>
|