Package flumotion :: Package manager :: Module component :: Class ComponentAvatar
[show private | hide private]
[frames | no frames]

Class ComponentAvatar

   Avatar --+    
            |    
 Loggable --+    
            |    
ManagerAvatar --+
                |
               ComponentAvatar


Manager-side avatar for a component. Each component that logs in to the manager gets an avatar created for it in the manager.
Method Summary
  __init__(self, heaven, avatarId)
  __del__(self)
  __repr__(self)
  attached(self, mind)
Tell the avatar that the given mind has been attached.
  authenticate(self, keycard)
  checkFeedReady(self, feedName)
  cleanup(self)
Clean up when detaching."
  detached(self, mind)
Tell the avatar that the peer's client referenced by the mind has detached.
  expireKeycard(self, keycardId)
Expire a keycard issued to this component because the bouncer decided to.
  getEaters(self)
Get a list of feeder names feeding this component.
  getElementProperty(self, element, property)
Get a property of an element.
  getFeeders(self)
Get a list of feeder names (componentName:feedName) in this component.
  getFeedPort(self, feedName)
Returns the port this feed is being fed on.
  getName(self)
  getParentName(self)
  getPid(self)
  getRemoteManagerIP(self)
  getType(self)
  getWorkerName(self)
Return the name of the worker.
  perspective_adminCallRemote(self, methodName, *args, **kwargs)
  perspective_authenticate(self, bouncerName, keycard)
  perspective_error(self, element, error)
  perspective_expireKeycard(self, requesterName, keycardId)
Expire a keycard (and thus the requester's connection) issued to the given requester.
  perspective_feedStateChanged(self, feedName, oldState, newState)
  perspective_heartbeat(self, moodValue)
  perspective_log(self, *msg)
  perspective_notifyFeedPorts(self, feedPorts)
  perspective_removeKeycard(self, bouncerName, keycardId)
Remove a keycard on the given bouncer on behalf of a component's medium.
twisted.internet.defer.Deferred reloadComponent(self)
Tell the component to reload itself.
  removeKeycard(self, keycardId)
Remove a keycard managed by this bouncer because the requester has gone.
  setElementProperty(self, element, property, value)
Set a property on an element.
  start(self, eatersData, feedersData)
Tell the component to start, possibly linking to other components.
  stateAppend(self, state, key, value)
  stateRemove(self, state, key, value)
  stateSet(self, state, key, value)
  stop(self)
Tell the avatar to stop the component.
    Inherited from ManagerAvatar
  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
MetaInterface __implements__ = flumotion.twisted.flavors.IStateListener
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)
Overrides:
flumotion.manager.base.ManagerAvatar.__init__ (inherited documentation)

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)

cleanup(self)

Clean up when detaching."

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)

expireKeycard(self, keycardId)

Expire a keycard issued to this component because the bouncer decided to.

getEaters(self)

Get a list of feeder names feeding this component.

Returns: a list of eater names, or the empty list.

getElementProperty(self, element, property)

Get a property of an element.
Parameters:
element - the element to get the property of
           (type=string)
property - the property to get
           (type=string)

getFeeders(self)

Get a list of feeder names (componentName:feedName) in this component.

Returns: a list of feeder names, or the empty list.

getFeedPort(self, feedName)

Returns the port this feed is being fed on.

getWorkerName(self)

Return the name of the worker.

perspective_expireKeycard(self, requesterName, keycardId)

Expire a keycard (and thus the requester's connection) issued to the given requester.

perspective_removeKeycard(self, bouncerName, keycardId)

Remove a keycard on the given bouncer on behalf of a component's medium.

reloadComponent(self)

Tell the component to reload itself.
Returns:
twisted.internet.defer.Deferred

removeKeycard(self, keycardId)

Remove a keycard managed by this bouncer because the requester has gone.

setElementProperty(self, element, property, value)

Set a property on an element.
Parameters:
element - the element to set the property on
           (type=string)
property - the property to set
           (type=string)
value - the value to set the property to
           (type=mixed)

start(self, eatersData, feedersData)

Tell the component to start, possibly linking to other components.
Parameters:
eatersData
           (type=tuple of (feedername, host, port) tuples of elements feeding our eaters)
feedersData
           (type=tuple of (name, host) tuples of our feeding elements)

stop(self)

Tell the avatar to stop the component.

Class Variable Details

logCategory

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

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