Package flumotion :: Package job :: Module job :: Class JobMedium
[show private | hide private]
[frames | no frames]

Class JobMedium

         Loggable --+    
                    |    
Jellyable --+       |    
            |       |    
 Serializable --+   |    
                |   |    
    Referenceable --+    
                    |    
           BaseMedium --+
                        |
                       JobMedium


I am a medium between the job and the worker's job avatar. I live in the job process.
Method Summary
  __init__(self)
  remote_bootstrap(self, workerName, host, port, transport, keycard, packagePaths)
I receive the information on how to connect to the manager.
  remote_create(self, avatarId, type, moduleName, methodName, config)
I am called on by the worker's JobAvatar to create a component.
  remote_stop(self)
  shutdown(self)
Shut down the job process completely, cleaning up the component so the reactor can be left from.
  _createComponent(self, avatarId, type, moduleName, methodName, config)
Create a component of the given type.
  _enableCoreDumps(self)
  _setNice(self, nice)
    Inherited from BaseMedium
  callRemote(self, 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 ?
  setRemoteReference(self, remoteReference)
Set the given remoteReference as the reference to the server-side avatar.
    Inherited from Referenceable
  jellyFor(self, jellier)
(internal)
  remoteMessageReceived(self, broker, message, args, kw)
A remote message has been received.
    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.
  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.

Instance Variable Summary
    Inherited from BaseMedium
NoneType bundleLoader: flumotion.common.bundleclient.BundleLoader
  remoteReference: twisted.spread.pb.RemoteReference

Class Variable Summary
tuple __implements__ = (<MetaInterface flumotion.common.interf...
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from BaseMedium
NoneType remote = None                                                                  
    Inherited from Referenceable
Implements __implemented__ = <implementedBy twisted.spread.flavors....
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
NoneType perspective = None                                                                  
    Inherited from Jellyable
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

remote_bootstrap(self, workerName, host, port, transport, keycard, packagePaths)

I receive the information on how to connect to the manager. I also set up package paths to be able to run the component.

Called by the worker's JobAvatar.
Parameters:
workerName - the name of the worker running this job
           (type=str)
host - the host that is running the manager
           (type=str)
port - port on which the manager is listening
           (type=int)
transport - 'tcp' or 'ssl'
           (type=string)
keycard - credentials used to log in to the manager
           (type=flumotion.common.keycards.Keycard)
packagePaths - ordered list of (package name, package path) tuples
           (type=list of (str, str))

remote_create(self, avatarId, type, moduleName, methodName, config)

I am called on by the worker's JobAvatar to create a component.
Parameters:
avatarId - avatarId for component to log in to manager
           (type=string)
type - type of component to start
           (type=string)
moduleName - name of the module to create the component from
           (type=string)
methodName - the factory method to use to create the component
           (type=string)
config - the configuration dictionary
           (type=dict)

shutdown(self)

Shut down the job process completely, cleaning up the component so the reactor can be left from.

_createComponent(self, avatarId, type, moduleName, methodName, config)

Create a component of the given type. Log in to the manager with the given avatarId.
Parameters:
avatarId - avatarId component will use to log in to manager
           (type=string)
type - type of component to start
           (type=string)
moduleName - name of the module that contains the entry point
           (type=string)
methodName - name of the factory method to create the component
           (type=string)
config - the configuration dictionary
           (type=dict)

Class Variable Details

__implements__

Type:
tuple
Value:
(<MetaInterface flumotion.common.interfaces.IJobMedium>,)              

logCategory

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

Generated by Epydoc 2.1 on Wed Sep 13 13:38:33 2006 http://epydoc.sf.net