twisted.spread.pb.Perspective

Package twisted :: Package spread :: Module pb :: Class Perspective |
[frames | no frames]

## Class Perspective

         Avatar --+
                  |
    Perspective --+
                  |
                 Perspective

Known Subclasses:
  `Participant`

This class is DEPRECATED, because it relies on old cred APIs. Please use `Avatar`.

Method Summary
| ``brokerAttached`(self, reference, identity, broker)` An intermediary method to override.
| ``brokerDetached`(self, reference, identity, broker)` See `brokerAttached`.
Inherited from Perspective
| ``__init__`(self, perspectiveName, identityName)` Create me.
| ``attached`(self, reference, identity)` Called when a remote reference is 'attached' to me.
| ``detached`(self, reference, identity)` Called when a broker is 'detached' from me.
| ``getIdentityRequest`(self)` Request my identity.
| ``getPerspectiveName`(self)` Return the unique name of this perspective.
| ``getService`(self)` Return a service.
| ``isCached`(self)`
| ``makeIdentity`(self, password)` Make an identity from this perspective with a password.
| ``setCached`(self)`
| ``setIdentity`(self, ident)` Determine which identity I connect to.
| ``setIdentityName`(self, name)`
| ``setService`(self, service)` Change what service I am a part of.
Inherited from Avatar
| ``perspectiveMessageReceived`(self, broker, message, args, kw)` This method is called when a network message is received.

Class Variable Summary
Inherited from Perspective
`tuple` | `__implements__` = `(<class twisted.cred.perspective.IPersp...`
`int` | `_attachedCount` = 0
`int` | `_service_cached` = 0

Method Details

### brokerAttached(self, reference, identity, broker) An intermediary method to override. Normally you will want to use 'attached', as described in `twisted.cred.perspective.Perspective`.attached; however, this method serves the same purpose, and in some circumstances, you are sure that the protocol that objects will be attaching to your Perspective with is Perspective Broker, and in that case you may wish to get the Broker object they are connecting with, for example, to determine what host they are connecting from. Bear in mind that when overriding this method, other, non-PB protocols will not notify you of being attached or detached.

### brokerDetached(self, reference, identity, broker) See `brokerAttached`.

Generated by Epydoc 2.0 on Sat May 15 20:08:31 2004 | http://epydoc.sf.net