t.s.p.Avatar : class documentation

Part of twisted.spread.pb View Source View In Hierarchy

Known subclasses: twisted.manhole.service.Perspective

Implements interfaces: twisted.spread.pb.IPerspective

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 perspectiveMessageReceived This method is called when a network message is received.
def perspectiveMessageReceived(self, broker, message, args, kw): (source)
This method is called when a network message is received.

This will call:

   self.perspective_%(message)s(*broker.unserialize(args),
                                **broker.unserialize(kw))

to handle the method; subclasses of Avatar are expected to implement methods using this naming convention.

API Documentation for Twisted, generated by pydoctor at 2014-05-12 18:27:00.