Package flumotion :: Package common :: Module bundleclient :: Class BundleLoader
[hide private]

Class BundleLoader

source code

extern.log.log.Loggable --+
                          |
                         BundleLoader

I am an object that can get and set up bundles from a PB server.

Instance Methods [hide private]
 
__init__(self, callRemote) source code
 
getBundles(self, **kwargs)
Get, extract and register all bundles needed.
source code
twisted.internet.defer.Deferred
loadModule(self, moduleName)
Load the module given by name.
source code
twisted.internet.defer.Deferred
getBundleByName(self, bundleName)
Get the given bundle locally.
source code
 
getFile(self, fileName)
Do everything needed to get the given bundled file.
source code

Inherited from extern.log.log.Loggable: __providedBy__, debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure, writeMarker

Class Variables [hide private]
  remote = None
a remote reference to an avatar on the PB server.
  _unbundler = None

Inherited from extern.log.log.Loggable: __implemented__, __provides__, logCategory

Method Details [hide private]

__init__(self, callRemote)
(Constructor)

source code 
Parameters:
  • callRemote (callable)

getBundles(self, **kwargs)

source code 

Get, extract and register all bundles needed. Either one of bundleName, fileName or moduleName should be specified in **kwargs, which should be strings or lists of strings.

Returns:
a deferred firing a a list of (bundleName, bundlePath) tuples, with lowest dependency first. bundlePath is the directory to register for this package.

loadModule(self, moduleName)

source code 

Load the module given by name. Sets up all necessary bundles to be able to load the module.

Returns: twisted.internet.defer.Deferred
a deferred that will fire when the given module is loaded, giving the loaded module.

getBundleByName(self, bundleName)

source code 

Get the given bundle locally.

Returns: twisted.internet.defer.Deferred
a deferred returning the absolute path under which the bundle is extracted.

getFile(self, fileName)

source code 

Do everything needed to get the given bundled file.

Returns:
a deferred returning the absolute path to a local copy of the given file.