Package flumotion :: Package twisted :: Module pb :: Class ReconnectingFPBClientFactory
[show private | hide private]
[frames | no frames]

Class ReconnectingFPBClientFactory

             Loggable --+    
                        |    
      Factory --+       |    
                |       |    
    ClientFactory --+   |    
                    |   |    
      PBClientFactory --+    
                        |    
         FPBClientFactory --+
                            |
          Factory --+       |
                    |       |
        ClientFactory --+   |
                        |   |
ReconnectingClientFactory --+
                            |
                           ReconnectingFPBClientFactory

Known Subclasses:
WorkerClientFactory

Reconnecting client factory for FPB brokers.

Users of this factory call startLogin to start logging in. Override getLoginDeferred to get a handle to the deferred returned from the PB server.
Method Summary
  __init__(self)
  clientConnectionFailed(self, connector, reason)
Called when a connection has failed to connect.
  clientConnectionLost(self, connector, reason)
  clientConnectionMade(self, broker)
  gotDeferredLogin(self, deferred)
The deferred from login is now available.
  startLogin(self, keycard, client, *interfaces)
    Inherited from FPBClientFactory
  login(self, keycard, client, *interfaces)
Login, respond to challenges, and eventually get perspective from remote PB server.
  _cbLoginCallback(self, result, root, client, interfaces, count)
  _cbSendKeycard(self, root, keycard, client, interfaces, count)
  _cbSendUsername(self, root, username, password, avatarId, client, interfaces)
    Inherited from PBClientFactory
  disconnect(self)
If the factory is connected, close the connection.
  getPerspective(self, username, password, serviceName, perspectiveName, client)
Get perspective from remote PB server.
  getRootObject(self)
Get root object of remote PB server.
  _cbAuthIdentity(self, authServRef, username, password)
  _cbGetPerspective(self, identityWrapper, serviceName, perspectiveName, client)
  _cbRespondToChallenge(self, (challenge, challenger), password)
  _cbResponse(self, (challenge, challenger), password, client)
  _failAll(self, reason)
  _reset(self)
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, message)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
    Inherited from ReconnectingClientFactory
  resetDelay(self)
Call me after a successful connection to reset.
  retry(self, connector)
Have this connector connect again, after a suitable delay.
  stopTrying(self)
I put a stop to any attempt to reconnect in progress.
    Inherited from ClientFactory
  startedConnecting(self, connector)
Called when a connection has been started.
    Inherited from Factory
  buildProtocol(self, addr)
Create an instance of a subclass of Protocol.
  doStart(self)
Make sure startFactory is called.
  doStop(self)
Make sure stopFactory is called.
  startFactory(self)
This will be called before I begin listening on a Port or Connector.
  stopFactory(self)
This will be called before I stop listening on all Ports/Connectors.

Instance Variable Summary
    Inherited from ReconnectingClientFactory
float factor: a multiplicitive factor by which the delay grows
float initialDelay: Delay for the first reconnection attempt.
float jitter: percentage of randomness to introduce into the delay length to prevent stampeding.
int maxDelay: Maximum number of seconds between connection attempts.

Class Variable Summary
    Inherited from FPBClientFactory
str logcategory = 'FPBClientFactory'
    Inherited from PBClientFactory
int unsafeTracebacks = 0                                                                     
    Inherited from Loggable
str logCategory: Implementors can provide a category to log their messages under.
    Inherited from ReconnectingClientFactory
NoneType connector = None                                                                  
int continueTrying = 1                                                                     
float delay = 1.0                                                                   
NoneType maxRetries = None                                                                  
int retries = 0                                                                     
NoneType _callID = None                                                                  
    Inherited from Factory
tuple __implements__ = (<class 'twisted.internet.interfaces.IP...
str noisy = 'sure, why not'
int numPorts = 0                                                                     
NoneType protocol = None                                                                  

Method Details

clientConnectionFailed(self, connector, reason)

Called when a connection has failed to connect.

It may be useful to call connector.connect() - this will reconnect.
Parameters:
reason
           (type=twisted.python.failure.Failure)
Overrides:
twisted.spread.pb.PBClientFactory.clientConnectionFailed (inherited documentation)

gotDeferredLogin(self, deferred)

The deferred from login is now available.

Generated by Epydoc 2.1 on Wed Feb 16 07:22:59 2005 http://epydoc.sf.net