Package twisted :: Package web :: Package woven :: Module guard :: Class GuardSession
[show private | hide private]
[frames | no frames]

Class GuardSession

Versioned --+    
            |    
Componentized --+
                |
               GuardSession


A user's session with a system.

This utility class contains no functionality, but is used to represent a session.
Method Summary
  __init__(self, guard, uid)
Initialize a session with a unique ID for that session.
  __getstate__(self)
  __setstate__(self, d)
  addAdapter(self, adapterClass, ignoreClass, registry)
Utility method that calls addComponent. (inherited from Componentized)
  addComponent(self, component, ignoreClass, registry)
Add a component to me, for all appropriate interfaces. (inherited from Componentized)
  checkExpired(self)
  clientForService(self, service)
  expire(self)
Expire/logout of the session.
  getComponent(self, interface, registry, default)
Create or retrieve an adapter for the given interface. (inherited from Componentized)
  locateAdapterClass(self, klass, interfaceClass, default, registry)
(inherited from Componentized)
  notifyOnExpire(self, callback)
Call this callback when the session expires or logs out.
  portalLogout(self, port)
  removeComponent(self, component)
Remove the given component from me entirely, for all interfaces for which it has been registered. (inherited from Componentized)
  resourceForPortal(self, port)
  setAdapter(self, interfaceClass, adapterClass)
(inherited from Componentized)
  setClientForService(self, ident, perspective, client, service)
  setComponent(self, interfaceClass, component)
(inherited from Componentized)
  setLifetime(self, lifetime)
Set the approximate lifetime of this session, in seconds.
  setResourceForPortal(self, rsrc, port, logout)
  touch(self)
  unsetComponent(self, interfaceClass)
Remove my component specified by the given interface class. (inherited from Componentized)
  upgradeToVersion1(self)
(inherited from Componentized)
  versionUpgrade(self)
(internal) Do a version upgrade. (inherited from Versioned)

Method Details

__init__(self, guard, uid)
(Constructor)

Initialize a session with a unique ID for that session.

expire(self)

Expire/logout of the session.

notifyOnExpire(self, callback)

Call this callback when the session expires or logs out.

setLifetime(self, lifetime)

Set the approximate lifetime of this session, in seconds.

This is highly imprecise, but it allows you to set some general parameters about when this session will expire. A callback will be scheduled each 'lifetime' seconds, and if I have not been 'touch()'ed in half a lifetime, I will be immediately expired.

Generated by Epydoc 1.1 on Fri Jun 27 03:46:12 2003 http://epydoc.sf.net