Package flumotion :: Package manager :: Module worker :: Class WorkerAvatar
[show private | hide private]
[frames | no frames]

Class WorkerAvatar

   Avatar --+    
            |    
 Loggable --+    
            |    
ManagerAvatar --+
                |
               WorkerAvatar


I am an avatar created for a worker. A reference to me is given when logging in and requesting a worker avatar. I live in the manager.
Method Summary
  attached(self, mind)
Tell the avatar that the given mind has been attached.
  detached(self, mind)
Tell the avatar that the peer's client referenced by the mind has detached.
  getName(self)
  start(self, avatarId, type, config)
Start a component of the given type with the given config.
    Inherited from ManagerAvatar
  __init__(self, heaven, avatarId)
  getClientAddress(self)
Get the IPv4 address of the machine the client is connecting from.
boolean hasRemoteReference(self)
Check if the avatar has a remote reference to the peer.
  mindCallRemote(self, name, *args, **kwargs)
Call the given remote method.
list of (string, string) tuples of (bundleName, md5sum) perspective_getBundleSums(self, bundleName, fileName, moduleName)
Get a list of (bundleName, md5sum) of all dependency bundles, starting with this bundle, in the correct order.
list of (string, string) tuples perspective_getBundleSumsByFile(self, filename)
Get a list of (bundleName, md5sum) of all dependency bundles, starting with this bundle, in the correct order.
  perspective_getBundleZips(self, bundles)
Get the zip files for the given list of bundles.
    Inherited from Avatar
  perspectiveMessageReceived(self, broker, message, args, kw)
This method is called when a network message is received.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.

Method Details

attached(self, mind)

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. This is scheduled by the portal after the client has logged in.
Parameters:
mind
           (type=twisted.spread.pb.RemoteReference)
Overrides:
flumotion.manager.base.ManagerAvatar.attached (inherited documentation)

detached(self, mind)

Tell the avatar that the peer's client referenced by the mind has detached.

Called through the manager's PB logout trigger calling flumotion.manager.manager.Dispatcher.removeAvatar
Overrides:
flumotion.manager.base.ManagerAvatar.detached (inherited documentation)

start(self, avatarId, type, config)

Start a component of the given type with the given config.
Parameters:
avatarId - avatarId the component should use to log in
           (type=string)
type - type of the component to start
           (type=string)
config - a configuration dictionary for the component
           (type=dict)
Returns:
a deferred that will give the avatarId the component will use to log in to the manager

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'worker-avatar'                                                        

Generated by Epydoc 2.1 on Tue Dec 20 15:33:10 2005 http://epydoc.sf.net