|
Class: HTTPSession
Object
|
+--HTTPSession
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Server
- Version:
- rev:
1.14
date: 2021/02/24 14:56:03
- user: cg
- file: HTTPSession.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
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:]
copyrightCOPYRIGHT (c) 2004 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
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
-
(comment from inherited method)
return an instance of myself without indexed variables
accessing
-
at: aKey
-
(comment from inherited method)
return the indexed instance variable with index, anInteger;
this method can be redefined in subclasses.
-
at: aSymbol ifAbsent: anObject
-
(comment from inherited method)
return the indexed instance variable with index, anInteger.
If there is no such key, return the value from exceptionalValue.
This method is usually be redefined in subclasses.
-
at: aSymbol ifAbsentPut: aBlock
-
-
at: aSymbol ifPresent: aOneArgBlock
-
-
at: aKey put: aSymbol
-
(comment from inherited method)
store the 2nd arg, anObject as indexed instvar with index, anInteger.
this method can be redefined in subclasses. Returns anObject (sigh)
-
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>
|