Package twisted :: Package spread :: Module pb :: Class Avatar
[show private | hide private]
[frames | no frames]

Class Avatar

Known Subclasses:
ClientAvatar

A default IPerspective implementor.

This class is intended to be subclassed, and a realm should return an instance of such a subclass when IPerspective is requested of it.

A peer requesting a perspective will receive only a RemoteReference to a pb.Avatar. When a method is called on that RemoteReference, it will translate to a method on the remote perspective named 'perspective_methodname'. (For more information on invoking methods on other objects, see flavors.ViewPoint.)
Method Summary
  perspectiveMessageReceived(self, broker, message, args, kw)
This method is called when a network message is received.

Class Variable Summary
Implements __implemented__ = <implementedBy twisted.spread.pb.Avata...
_implementsTuple __implements__ = (<MetaInterface twisted.spread.pb.IPers...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

perspectiveMessageReceived(self, broker, message, args, kw)

This method is called when a network message is received.

I will call:
 |  self.perspective_%(message)s(*broker.unserialize(args),
 |                               **broker.unserialize(kw))
to handle the method; subclasses of Avatar are expected to implement methods of this naming convention.

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy twisted.spread.pb.Avatar>                               

__implements__

Type:
_implementsTuple
Value:
(<MetaInterface twisted.spread.pb.IPerspective>,)                      

__providedBy__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x303d8390>       

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x303d8390>       

Generated by Epydoc 2.1 on Thu Oct 20 15:30:26 2005 http://epydoc.sf.net