Package flumotion :: Package twisted :: Module pb :: Class PingableAvatar
[hide private]

Class PingableAvatar

source code

twisted.spread.pb.Avatar --+    
                           |    
 extern.log.log.Loggable --+    
                           |    
                      Avatar --+
                               |
                              PingableAvatar
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, avatarId, clock=reactor) source code
 
perspectiveMessageReceivedUnserialised(self, broker, message, args, kwargs) source code
 
perspective_ping(self) source code
 
mindCallRemoteLogging(self, level, stackDepth, name, *args, **kwargs)
Call the given remote method, and log calling and returning nicely.
source code
 
startPingChecking(self, disconnect) source code
 
_pingCheck(self) source code
 
stopPingChecking(self) source code
 
setMind(self, mind)
Tell the avatar that the given mind has been attached.
source code

Inherited from Avatar: disconnect, mindCallRemote, perspectiveMessageReceived

Inherited from twisted.spread.pb.Avatar: __providedBy__, __provides__

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  _pingCheckInterval = 30.0

Inherited from Avatar: logCategory, remoteLogName

Inherited from twisted.spread.pb.Avatar: __implemented__

Method Details [hide private]

__init__(self, avatarId, clock=reactor)
(Constructor)

source code 
Overrides: Avatar.__init__

perspectiveMessageReceivedUnserialised(self, broker, message, args, kwargs)

source code 
Overrides: Avatar.perspectiveMessageReceivedUnserialised

mindCallRemoteLogging(self, level, stackDepth, name, *args, **kwargs)

source code 

Call the given remote method, and log calling and returning nicely.

Parameters:
  • level - the level we should log at (log.DEBUG, log.INFO, etc)
  • stackDepth - the number of stack frames to go back to get file and line information, negative or zero.
  • name - name of the remote method
Overrides: Avatar.mindCallRemoteLogging
(inherited documentation)

setMind(self, mind)

source code 

Tell the avatar that the given mind has been attached. This gives the avatar a way to call remotely to the client that requested this avatar.

It is best to call setMind() from within the avatar's __init__ method. Some old code still does this via a callLater, however.

Overrides: Avatar.setMind
(inherited documentation)