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

Class WorkerMedium

         Loggable --+            
                    |            
Jellyable --+       |            
            |       |            
 Serializable --+   |            
                |   |            
    Referenceable --+            
                    |            
        Referenceable --+        
                        |        
               BaseMedium --+    
                            |    
                PingingMedium --+
                                |
                               WorkerMedium


I am a medium interfacing with the manager-side WorkerAvatar.
Method Summary
  __init__(self, brain, ports)
list of str remote_checkElements(self, elementNames)
Checks if one or more GStreamer elements are present and can be instantiated.
  remote_checkImport(self, moduleName)
Checks if the given module can be imported.
  remote_create(self, *args, **kwargs)
  remote_getComponents(self)
I return a list of componentAvatarIds, I have.
int, or NoneType remote_getFeedServerPort(self)
Return the TCP port the Feed Server is listening on.
list of int remote_getPorts(self)
Gets the range of feed ports that this worker was configured to use.
  remote_runFunction(self, module, function, *args, **kwargs)
Runs the given function in the given module with the given arguments.
    Inherited from PingingMedium
  setRemoteReference(self, remote)
  startPinging(self, disconnect)
  stopPinging(self)
  _disconnect(self)
  _ping(self)
  _pingCheck(self)
    Inherited from BaseMedium
  callRemote(self, name, *args, **kwargs)
Call the given method with the given arguments remotely on the server-side avatar.
  callRemoteLogging(self, level, stackDepth, name, *args, **kwargs)
Call the given method with the given arguments remotely on the server-side avatar.
  hasRemoteReference(self)
Does the medium have a remote reference to a server-side avatar ?
  runBundledFunction(self, *args, **kwargs)
    Inherited from Referenceable
  remoteMessageReceived(self, broker, message, args, kwargs)
    Inherited from Referenceable
  jellyFor(self, jellier)
(internal)
    Inherited from Serializable
  processUniqueID(self)
Return an ID which uniquely represents this object for this process.
    Inherited from Jellyable
  getStateFor(self, jellier)
    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.

Instance Variable Summary
WorkerBrain brain: the worker brain
    Inherited from BaseMedium
twisted.spread.pb.RemoteReference remote: a remote reference to the server-side object on which perspective_(methodName) methods can be called

Class Variable Summary
Implements __implemented__ = <implementedBy flumotion.worker.worker...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from PingingMedium
float _pingCheckInterval = 12.5                                                                  
NoneType _pingDC = None                                                                  
int _pingInterval = 5                                                                     
    Inherited from BaseMedium
flumotion.common.bundleclient.BundleLoader bundleLoader = None                                                                  
str remoteLogName: name to use to log the other side of the connection
    Inherited from Referenceable
NoneType perspective = None                                                                  
    Inherited from Jellyable
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

__init__(self, brain, ports)
(Constructor)

Parameters:
brain
           (type=WorkerBrain)

remote_checkElements(self, elementNames)

Checks if one or more GStreamer elements are present and can be instantiated.
Parameters:
elementNames - names of the Gstreamer elements
           (type=list of str)
Returns:
a list of instantiatable element names
           (type=list of str)

remote_checkImport(self, moduleName)

Checks if the given module can be imported.
Parameters:
moduleName - name of the module to check
           (type=str)
Returns:
None or Failure

remote_getComponents(self)

I return a list of componentAvatarIds, I have. I am called by the manager soon after I attach to it. This is needed on reconnects so that the manager knows what components it needs to start on me.
Returns:
a list of componentAvatarIds

remote_getFeedServerPort(self)

Return the TCP port the Feed Server is listening on.
Returns:
TCP port number, or None if there is no feed server
           (type=int, or NoneType)

remote_getPorts(self)

Gets the range of feed ports that this worker was configured to use.
Returns:
list of ports
           (type=list of int)

remote_runFunction(self, module, function, *args, **kwargs)

Runs the given function in the given module with the given arguments.
Parameters:
module - module the function lives in
           (type=str)
function - function to run
           (type=str)
Returns:
the return value of the given function in the module.

Instance Variable Details

brain

the worker brain
Type:
WorkerBrain

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy flumotion.worker.worker.WorkerMedium>                   

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x8850d2c>        

logCategory

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

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