Package flumotion :: Package manager :: Module manager :: Class Dispatcher
[show private | hide private]
[frames | no frames]

Class Dispatcher

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.
Method Summary
  __init__(self, computeIdentity)
  createAvatarFor(self, avatarId, keycard, remoteHost, ifaces)
Create an avatar from the heaven implementing the given interface.
  registerHeaven(self, heaven, interface)
Register a Heaven as managing components with the given interface.
  removeAvatar(self, avatarId, avatar, mind)
Remove an avatar because it logged out of the manager.
  requestAvatar(self, avatarId, keycard, mind, *ifaces)
    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.

Class Variable Summary
Implements __implemented__ = <implementedBy flumotion.manager.manag...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from Loggable
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

__init__(self, computeIdentity)
(Constructor)

Parameters:
computeIdentity - see Vishnu.computeIdentity
           (type=callable)

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

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

registerHeaven(self, heaven, interface)

Register a Heaven as managing components with the given interface.
Parameters:
interface - a component interface to register the heaven with.
           (type=twisted.python.components.Interface)

removeAvatar(self, avatarId, avatar, mind)

Remove an avatar because it logged out of the manager.

This function is registered by requestAvatar.

Class Variable Details

__implemented__

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

__provides__

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

logCategory

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

Generated by Epydoc 2.1 on Sat Apr 14 13:16:07 2007 http://epydoc.sf.net