Package flumotion :: Package worker :: Module base :: Class BaseJobAvatar
[hide private]

Class BaseJobAvatar

source code

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

I am an avatar for the job living in the worker.

Instance Methods [hide private]
 
__init__(self, heaven, avatarId, mind) source code
 
setMind(self, mind)
Tell the avatar that the given mind has been attached.
source code
 
haveMind(self) source code
 
logout(self) source code
 
stop(self)
returns: a deferred marking completed stop.
source code
 
_sendFileDescriptor(self, fd, message) source code
 
logTo(self, stdout, stderr)
Tell the job to log to the given file descriptors.
source code

Inherited from twisted.pb.Avatar: disconnect, mindCallRemote, mindCallRemoteLogging, perspectiveMessageReceived, perspectiveMessageReceivedUnserialised

Inherited from twisted.spread.pb.Avatar: __providedBy__

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

Class Variables [hide private]
  logCategory = 'job-avatar'
Implementors can provide a category to log their messages under.

Inherited from twisted.pb.Avatar: remoteLogName

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

Method Details [hide private]

__init__(self, heaven, avatarId, mind)
(Constructor)

source code 
Parameters:
Overrides: twisted.pb.Avatar.__init__

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.

Parameters:
  • mind (twisted.spread.pb.RemoteReference) - reference to the job's JobMedium on which we can call
Overrides: twisted.pb.Avatar.setMind