Package flumotion :: Package manager :: Module base :: Class ManagerAvatar
[show private | hide private]
[frames | no frames]

Class ManagerAvatar

  Avatar --+
           |
Loggable --+
           |
          ManagerAvatar

Known Subclasses:
AdminAvatar, ComponentAvatar, WorkerAvatar

I am a base class for manager-side avatars to subclass from.
Method Summary
  __init__(self, heaven, avatarId)
  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.
  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 perspective_getBundleSums(self, bundleName)
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.

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

Method Details

__init__(self, heaven, avatarId)
(Constructor)

Parameters:
heaven
           (type=flumotion.manager.base.ManagerHeaven)

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)

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

getClientAddress(self)

Get the IPv4 address of the machine the client is connecting from.

hasRemoteReference(self)

Check if the avatar has a remote reference to the peer.
Returns:
boolean

mindCallRemote(self, name, *args, **kwargs)

Call the given remote method.

perspective_getBundleSums(self, bundleName)

Get a list of (bundleName, md5sum) of all dependency bundles, starting with this bundle, in the correct order.
Parameters:
bundleName - the name of the bundle
           (type=string)
Returns:
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.
Parameters:
filename - the name of the file in a bundle
           (type=string)
Returns:
list of (string, string) tuples

perspective_getBundleZips(self, bundles)

Get the zip files for the given list of bundles.
Parameters:
bundles - the names of the bundles to get
           (type=list of string)
Returns:
a dictionary of name -> zip data

Generated by Epydoc 2.1 on Wed Feb 16 07:23:00 2005 http://epydoc.sf.net