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

Class BundleLoader

source code

log.Loggable --+
               |
              BundleLoader

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

Instance Methods [hide private]
 
__init__(self, remote) source code
 
_callRemote(self, methodName, *args, **kwargs)
Call the given remote method on the manager-side Avatar.
source code
 
getBundles(self, *args, **kwargs)
Get, extract and register all bundles needed.
source code
twisted.internet.defer.Deferred
loadModule(self, *args, **kwargs)
Load the module given by name.
source code
twisted.internet.defer.Deferred
getBundleByName(self, *args, **kwargs)
Get the given bundle locally.
source code
 
getFile(self, *args, **kwargs)
Do everything needed to get the given bundled file.
source code

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

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

Inherited from log.Loggable: __implemented__, __provides__, logCategory

Method Details [hide private]

__init__(self, remote)
(Constructor)

source code 
Parameters:
  • remote (twisted.spread.pb.RemoteReference)

getBundles(self, *args, **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, *args, **kwargs)

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, *args, **kwargs)

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, *args, **kwargs)

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.