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

Class JobAvatar

  Avatar --+
           |
Loggable --+
           |
          JobAvatar


I am an avatar for the job living in the worker.
Method Summary
  __init__(self, heaven, avatarId)
  attached(self, *args, **kwargs)
boolean hasRemoteReference(self)
Check if the avatar has a remote reference to the peer.
  logout(self)
  logTo(self, stdout, stderr)
Tell the feeder to log to the given file descriptors.
  perspective_cleanShutdown(self)
This notification from the job process will be fired when it is shutting down, so that although the process might still be around, we know it's OK to accept new start requests for this avatar ID.
  receiveFeed(self, feedId, fd)
Tell the feeder to receive the given feed from the given fd.
  remote_ready(self)
  sendFeed(self, feedName, fd, eaterId)
Tell the feeder to send the given feed to the given fd.
  stop(self)
returns: a deferred marking completed stop.
    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.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Avatar
Implements __implemented__ = <implementedBy twisted.spread.pb.Avata...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

__init__(self, heaven, avatarId)
(Constructor)

Parameters:
heaven
           (type=flumotion.worker.worker.JobHeaven)
avatarId
           (type=str)

hasRemoteReference(self)

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

logTo(self, stdout, stderr)

Tell the feeder to log to the given file descriptors.

perspective_cleanShutdown(self)

This notification from the job process will be fired when it is shutting down, so that although the process might still be around, we know it's OK to accept new start requests for this avatar ID.

receiveFeed(self, feedId, fd)

Tell the feeder to receive the given feed from the given fd.
Returns:
whether the fd was successfully handed off to the component.

sendFeed(self, feedName, fd, eaterId)

Tell the feeder to send the given feed to the given fd.
Returns:
whether the fd was successfully handed off to the component.

stop(self)

returns: a deferred marking completed stop.

Class Variable Details

logCategory

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

Generated by Epydoc 2.1 on Sat Apr 14 13:16:50 2007 http://epydoc.sf.net