Home | Trees | Index | Help |
|
---|
Package twisted :: Package cred :: Module perspective :: Class Perspective |
|
MemoryAccount
,
Perspective
I am an Identity's view onto a service.
I am the interface through which most 'external' code should interact with a service; I represent the actions a user may perform upon a service, and the state associated with that user for that service.Method Summary | |
---|---|
Create me. | |
Called when a remote reference is 'attached' to me. | |
Called when a broker is 'detached' from me. | |
Request my identity. | |
Return the unique name of this perspective. | |
Return a service. | |
isCached(self)
| |
Make an identity from this perspective with a password. | |
setCached(self)
| |
Determine which identity I connect to. | |
setIdentityName(self,
name)
| |
Change what service I am a part of. |
Class Variable Summary | |
---|---|
tuple |
__implements__ = (<class twisted.cred.perspective.IPersp...
|
int |
_attachedCount = 0 |
int |
_service_cached = 0 |
Method Details |
---|
__init__(self,
perspectiveName,
identityName='Nobody')
|
attached(self, reference, identity)Called when a remote reference is 'attached' to me. After being authorized, a remote actor can attach to me through its identity. This call will be made when that happens, and the return value of this method will be used as the _actual_ perspective to which I am attached. Note that the symmetric call, detached, will be made on whatever this method returns, _not_ on me. Therefore, by default I return 'self'. |
detached(self, reference, identity)Called when a broker is 'detached' from me. See 'attached'. When a remote actor disconnects (or times out, for example, with HTTP), this is called in order to indicate that the reference associated with that peer is no longer attached to this perspective. |
getIdentityRequest(self)Request my identity. |
getPerspectiveName(self)Return the unique name of this perspective. This will return a value such that self.service.getPerspectiveNamed(value) is self. (XXX: That's assuming I have been addPerspective'd to my service.) |
getService(self)Return a service. |
makeIdentity(self, password)Make an identity from this perspective with a password. This is a utility method, which can be used in circumstances where the distinction between Perspective and Identity is weak, such as single-Service servers. |
setIdentity(self, ident)Determine which identity I connect to. |
setService(self, service)Change what service I am a part of. |
Class Variable Details |
---|
__implements__
|
_attachedCount
|
_service_cached
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat May 15 20:08:26 2004 | http://epydoc.sf.net |