Package flumotion :: Package manager :: Module manager :: Class Dispatcher
[hide private]

Class Dispatcher

source code

common.log.Loggable --+
                      |
                     Dispatcher

I implement twisted.cred.portal.IRealm. I make sure that when a pb.Avatar is requested through me, the Avatar being returned knows about the mind (client) requesting the Avatar.

Instance Methods [hide private]
 
__init__(self, computeIdentity) source code
 
requestAvatar(self, avatarId, keycard, mind, *ifaces) source code
 
removeAvatar(self, avatarId, avatar, mind)
Remove an avatar because it logged out of the manager.
source code
 
createAvatarFor(self, avatarId, keycard, remoteHost, ifaces)
Create an avatar from the heaven implementing the given interface.
source code
 
registerHeaven(self, heaven, interface)
Register a Heaven as managing components with the given interface.
source code

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

Class Variables [hide private]
  logCategory = 'dispatcher'
Implementors can provide a category to log their messages under.
  __implemented__ = <implementedBy flumotion.manager.manager.Dis...
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Method Details [hide private]

__init__(self, computeIdentity)
(Constructor)

source code 
Parameters:

removeAvatar(self, avatarId, avatar, mind)

source code 

Remove an avatar because it logged out of the manager.

This function is registered by requestAvatar.

createAvatarFor(self, avatarId, keycard, remoteHost, ifaces)

source code 

Create an avatar from the heaven implementing the given interface.

Parameters:
  • avatarId (str) - the name of the new avatar
  • keycard (flumotion.common.keycards.Keycard) - the credentials being used to log in
  • remoteHost (str) - the remote host
  • ifaces (tuple of interfaces linked to heaven) - a list of heaven interfaces to get avatar from, including pb.IPerspective
Returns:
a deferred that will fire an avatar from the heaven managing the given interface.

registerHeaven(self, heaven, interface)

source code 

Register a Heaven as managing components with the given interface.

Parameters:
  • interface (twisted.python.components.Interface) - a component interface to register the heaven with.

Class Variable Details [hide private]

__implemented__

Value:
<implementedBy flumotion.manager.manager.Dispatcher>

__provides__

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