Class t.w.w.g.GuardSession(components.Componentized):

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.

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
40 Method __init__ Initialize a session with a unique ID for that session.
62 Method clientForService Undocumented
69 Method setClientForService Undocumented
83 Method resourceForPortal Undocumented
86 Method setResourceForPortal Undocumented
91 Method portalLogout Undocumented
101 Method setLifetime Set the approximate lifetime of this session, in seconds.
111 Method notifyOnExpire Call this callback when the session expires or logs out.
116 Method expire Expire/logout of the session.
131 Method touch Undocumented
134 Method checkExpired Undocumented
146 Method __getstate__ Get state, adding a version number to it on its way out.
152 Method __setstate__ Undocumented
53 Method _getSelf Undocumented

Inherited from Componentized:

Line # Kind Name Docs
209 Method locateAdapterClass Undocumented
212 Method setAdapter Undocumented
215 Method addAdapter Utility method that calls addComponent. I take an adapter class and
225 Method setComponent Undocumented
230 Method addComponent Add a component to me, for all appropriate interfaces.
252 Method unsetComponent Remove my component specified by the given interface class.
256 Method removeComponent Remove the given component from me entirely, for all interfaces for which
270 Method getComponent Create or retrieve an adapter for the given interface.
303 Method __conform__ Undocumented

Inherited from Versioned (via Componentized):

Line # Kind Name Docs
207 Method versionUpgrade (internal) Do a version upgrade.
Line # Kind Name Docs
303 Method __conform__ Undocumented
146 Method __getstate__ Get state, adding a version number to it on its way out.
40 Method __init__ Initialize a session with a unique ID for that session.
152 Method __setstate__ Undocumented
215 Method addAdapter Utility method that calls addComponent. I take an adapter class and
230 Method addComponent Add a component to me, for all appropriate interfaces.
134 Method checkExpired Undocumented
62 Method clientForService Undocumented
116 Method expire Expire/logout of the session.
270 Method getComponent Create or retrieve an adapter for the given interface.
209 Method locateAdapterClass Undocumented
111 Method notifyOnExpire Call this callback when the session expires or logs out.
91 Method portalLogout Undocumented
256 Method removeComponent Remove the given component from me entirely, for all interfaces for which
83 Method resourceForPortal Undocumented
212 Method setAdapter Undocumented
69 Method setClientForService Undocumented
225 Method setComponent Undocumented
101 Method setLifetime Set the approximate lifetime of this session, in seconds.
86 Method setResourceForPortal Undocumented
131 Method touch Undocumented
252 Method unsetComponent Remove my component specified by the given interface class.
207 Method versionUpgrade (internal) Do a version upgrade.
53 Method _getSelf Undocumented
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 2008-10-26 16:12:37.