Package flumotion :: Package twisted :: Module pb :: Class FPBClientFactory
[hide private]

Class FPBClientFactory

source code

  twisted.internet.protocol.Factory --+        
                                      |        
twisted.internet.protocol.ClientFactory --+    
                                          |    
          twisted.spread.pb.PBClientFactory --+
                                              |
                    extern.log.log.Loggable --+
                                              |
                                             FPBClientFactory
Known Subclasses:

I am an extended Perspective Broker client factory using generic keycards for login.

Nested Classes [hide private]

Inherited from twisted.spread.pb.PBClientFactory: protocol

Instance Methods [hide private]
 
startedConnecting(self, connector)
Called when a connection has been started.
source code
 
disconnect(self)
If the factory is connected, close the connection.
source code
twisted.internet.defer.Deferred returning list of str
getKeycardClasses(self)
Ask the remote PB server for all the keycard interfaces it supports.
source code
 
login(self, authenticator)
Login, respond to challenges, and eventually get perspective from remote PB server.
source code
 
_cbSendUsername(self, root, username, password, avatarId, client, interfaces) source code
 
_cbSendKeycard(self, root, authenticator, client, interfaces, count=0) source code
 
_cbLoginCallback(self, result, root, authenticator, client, interfaces, count) source code

Inherited from twisted.spread.pb.PBClientFactory: __init__, clientConnectionFailed, clientConnectionLost, clientConnectionMade, getPerspective, getRootObject

Inherited from twisted.spread.pb.PBClientFactory (private): _cbResponse, _failAll, _reset

Inherited from twisted.internet.protocol.Factory: __providedBy__, buildProtocol, doStart, doStop, startFactory, stopFactory

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

Class Variables [hide private]
  logCategory = 'FPBClientFactory'
Implementors can provide a category to log their messages under.
  _fpbconnector = None

Inherited from twisted.spread.pb.PBClientFactory: unsafeTracebacks

Inherited from twisted.internet.protocol.Factory: __implemented__, __provides__, noisy, numPorts

Instance Variables [hide private]
keycards.Keycard keycard = None
the keycard used last for logging in; set after self.login has completed
flumotion.common.medium.BaseMedium medium = None
the client-side referenceable for the PB server to call on, and for the client to call to the PB server
subclass of flumotion.common.interfaces.IMedium perspectiveInterface = None
the interface we want to request a perspective for
Method Details [hide private]

startedConnecting(self, connector)

source code 

Called when a connection has been started.

You can call connector.stopConnecting() to stop the connection attempt.

Parameters:
  • connector - a Connector object.
Overrides: twisted.internet.protocol.ClientFactory.startedConnecting
(inherited documentation)

disconnect(self)

source code 

If the factory is connected, close the connection.

Note that if you set up the factory to reconnect, you will need to implement extra logic to prevent automatic reconnection after this is called.

Overrides: twisted.spread.pb.PBClientFactory.disconnect
(inherited documentation)

login(self, authenticator)

source code 

Login, respond to challenges, and eventually get perspective from remote PB server.

Currently only credentials implementing IUsernamePassword are supported.

Returns:
Deferred of RemoteReference to the perspective.
Overrides: __main__.login

_cbSendUsername(self, root, username, password, avatarId, client, interfaces)

source code 
Overrides: twisted.spread.pb.PBClientFactory._cbSendUsername