Squeak Class Documentation category index | class index  
 
Session
  category: Network-Pluggable Web Server
  superclass: Object
  subclasses:

A Session can provide server-side storage of state/data between HTML pages. After creating a new session (which can be manipulated using at: and at:put:), it can be saved on the Sessions list by asking the Session class to store: the session. A random integer is returned as a key to the session, and the key can be stored in an HTML page in a hidden field.

A session can be retrieved by ID by asking Session to recall: an ID. A session can be retired when it is no longer useful.

Each recall: or use at:/at:put: "touches" (updates) the Session's last use time. A Session that is older than a certain period (default 30 minutes, in viableTime instance method) will generate an error. Every hour, the PWS, as part of its backup procedures, will clear out old sessions.

instance methods
  access
  at:
at:put:
isViable
touch
viableTime

  initialize
  initialize

class methods
  initialization
  initialize
new

  store/recall
  clearOld
recall:
retire:
store:

instance methods
  access top  
 

at:

Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.


 

at:put:

Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.


 

isViable


 

touch


 

viableTime

In seconds


  initialize top  
 

initialize


class methods
  initialization top  
 

initialize

Object initialize


 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


  store/recall top  
 

clearOld


 

recall:


 

retire:


 

store: