Package flumotion :: Package common :: Module medium :: Class BaseMedium
[show private | hide private]
[frames | no frames]

Class BaseMedium

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

Known Subclasses:
JobMedium, PingingMedium

I am a base interface for PB clients interfacing with PB server-side avatars. Used by admin/worker/component to talk to manager's vishnu, and by job to talk to worker's brain.
Method Summary
  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)
  setRemoteReference(self, remoteReference)
Set the given remoteReference as the reference to the server-side avatar.
    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
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.common.medium...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
flumotion.common.bundleclient.BundleLoader bundleLoader = None                                                                  
str logCategory: Implementors can provide a category to log their messages under.
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

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

Call the given method with the given arguments remotely on the server-side avatar.

Gets serialized to server-side perspective_ methods.

callRemoteLogging(self, level, stackDepth, name, *args, **kwargs)

Call the given method with the given arguments remotely on the server-side avatar.

Gets serialized to server-side perspective_ methods.
Parameters:
level - the level we should log at (log.DEBUG, log.INFO, etc)
           (type=int)
stackDepth - the number of stack frames to go back to get file and line information, negative or zero.
           (type=non-positive int)
name - name of the remote method
           (type=str)

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.
Parameters:
remoteReference - twisted.spread.pb.RemoteReference

Instance Variable Details

remote

a remote reference to the server-side object on which perspective_(methodName) methods can be called
Type:
twisted.spread.pb.RemoteReference
Value:
None                                                                  

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy flumotion.common.medium.BaseMedium>                     

__provides__

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

bundleLoader

Type:
flumotion.common.bundleclient.BundleLoader
Value:
None                                                                  

logCategory

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

remoteLogName

name to use to log the other side of the connection
Type:
str
Value:
'baseavatar'                                                           

Generated by Epydoc 2.1 on Fri Feb 2 11:44:36 2007 http://epydoc.sf.net