t.w.w.g.GuardSession(components.Componentized) : class documentation

Part of twisted.web.woven.guard View Source View In Hierarchy

A user's session with a system.

This utility class contains no functionality, but is used to represent a session.
Method __init__ Initialize a session with a unique ID for that session.
Method clientForService Undocumented
Method setClientForService Undocumented
Method resourceForPortal Undocumented
Method setResourceForPortal Undocumented
Method portalLogout Undocumented
Method setLifetime Set the approximate lifetime of this session, in seconds.
Method notifyOnExpire Call this callback when the session expires or logs out.
Method expire Expire/logout of the session.
Method touch Undocumented
Method checkExpired Undocumented
Method __getstate__ Get state, adding a version number to it on its way out.
Method __setstate__ Undocumented
Method _getSelf Undocumented

Inherited from Componentized:

Method locateAdapterClass Undocumented
Method setAdapter Undocumented
Method addAdapter Utility method that calls addComponent. I take an adapter class and instantiate it with myself as the first argument.
Method setComponent Undocumented
Method addComponent Add a component to me, for all appropriate interfaces.
Method unsetComponent Remove my component specified by the given interface class.
Method removeComponent Remove the given component from me entirely, for all interfaces for which it has been registered.
Method getComponent Create or retrieve an adapter for the given interface.
Method __conform__ Undocumented

Inherited from Versioned (via Componentized):

Method versionUpgrade (internal) Do a version upgrade.
def __init__(self, guard, uid): (source)
Initialize a session with a unique ID for that session.
def _getSelf(self, interface=None): (source)
Undocumented
def clientForService(self, service): (source)
Undocumented
def setClientForService(self, ident, perspective, client, service): (source)
Undocumented
def resourceForPortal(self, port): (source)
Undocumented
def setResourceForPortal(self, rsrc, port, logout): (source)
Undocumented
def portalLogout(self, port): (source)
Undocumented
def setLifetime(self, lifetime): (source)

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.
def notifyOnExpire(self, callback): (source)
Call this callback when the session expires or logs out.
def expire(self): (source)
Expire/logout of the session.
def touch(self): (source)
Undocumented
def checkExpired(self): (source)
Undocumented
def __getstate__(self): (source)
Get state, adding a version number to it on its way out.
def __setstate__(self, d): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.