class documentation
class Session(components.Componentized): (source)
Constructor: Session(site, uid, reactor)
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 | expire |
Expire/logout of the session. |
Method | notify |
Call this callback when the session expires or logs out. |
Method | start |
Start expiration tracking. |
Method | touch |
Mark the session as modified, which resets expiration timer. |
Instance Variable | expire |
Undocumented |
Instance Variable | last |
Time the touch() method was last called (or time the session was created). A UNIX timestamp as returned by IReactorTime.seconds() . |
Instance Variable | session |
Undocumented |
Instance Variable | session |
Time after last modification the session will expire, in seconds. |
Instance Variable | site |
The Site that generated the session. |
Instance Variable | uid |
A unique identifier for the session. |
Instance Variable | _expire |
Undocumented |
Instance Variable | _reactor |
An object providing IReactorTime to use for scheduling expiration. |
Inherited from Componentized
:
Method | __conform__ |
Undocumented |
Method | add |
Utility method that calls addComponent. I take an adapter class and instantiate it with myself as the first argument. |
Method | add |
Add a component to me, for all appropriate interfaces. |
Method | get |
Create or retrieve an adapter for the given interface. |
Method | locate |
Undocumented |
Method | remove |
Remove the given component from me entirely, for all interfaces for which it has been registered. |
Method | set |
Cache a provider for the given interface, by adapting self using the given adapter class. |
Method | set |
Cache a provider of the given interface. |
Method | unset |
Remove my component specified by the given interface class. |
Class Variable | persistence |
Undocumented |
Instance Variable | _adapter |
Undocumented |
Initialize a session with a unique ID for that session.
Parameters | |
site | Undocumented |
uid | Undocumented |
reactor | IReactorTime used to schedule expiration of the session. If None, the reactor associated with site is used. |
Time the touch() method was last called (or time the session was created). A UNIX timestamp as returned by IReactorTime.seconds()
.