Package buildbot :: Package slave :: Module bot :: Class BotFactory
[frames] | no frames]

Class BotFactory

source code

          twisted.internet.protocol.Factory --+            
                                              |            
        twisted.internet.protocol.ClientFactory --+        
                                                  |        
                  twisted.spread.pb.PBClientFactory --+    
                                                      |    
          twisted.internet.protocol.Factory --+       |    
                                              |       |    
        twisted.internet.protocol.ClientFactory --+   |    
                                                  |   |    
twisted.internet.protocol.ReconnectingClientFactory --+    
                                                      |    
                     pbutil.ReconnectingPBClientFactory --+
                                                          |
                                                         BotFactory

Nested Classes

Inherited from twisted.spread.pb.PBClientFactory: protocol

Instance Methods
 
__init__(self, keepaliveInterval, keepaliveTimeout, maxDelay) source code
 
startedConnecting(self, connector)
Called when a connection has been started.
source code
 
gotPerspective(self, perspective)
The remote avatar or perspective (obtained each time this factory connects) is now available.
source code
 
clientConnectionFailed(self, connector, reason)
Called when a connection has failed to connect.
source code
 
clientConnectionLost(self, connector, reason)
Reconnecting subclasses should call with reconnecting=1.
source code
 
startTimers(self) source code
 
stopTimers(self) source code
 
activity(self, res=None) source code
 
doKeepalive(self) source code
 
keepaliveLost(self, f) source code
 
checkActivity(self) source code
 
stopFactory(self)
This will be called before I stop listening on all Ports/Connectors.
source code

Inherited from pbutil.ReconnectingPBClientFactory: clientConnectionMade, doGetPerspective, doLogin, failedToGetPerspective, getPerspective, gotRootObject, login, startGettingPerspective, startLogin

Inherited from twisted.spread.pb.PBClientFactory: buildProtocol, disconnect, getRootObject

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

Inherited from twisted.internet.protocol.ReconnectingClientFactory: __getstate__, resetDelay, retry, stopTrying

Class Variables
  keepaliveInterval = None
  keepaliveTimeout = 30
  maxDelay = 300
Maximum number of seconds between connection attempts.
  keepaliveTimer = None
  activityTimer = None
  lastActivity = 0
  unsafeTracebacks = 1
  perspective = None

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

Inherited from twisted.internet.protocol.ReconnectingClientFactory: connector, continueTrying, delay, maxRetries, retries

Instance Variables

Inherited from twisted.internet.protocol.ReconnectingClientFactory: clock, factor, initialDelay, jitter

Method Details

__init__(self, keepaliveInterval, keepaliveTimeout, maxDelay)
(Constructor)

source code 
Parameters:
  • unsafeTracebacks - if set, tracebacks for exceptions will be sent over the wire.
  • security - security options used by the broker, default to globalSecurity.
Overrides: twisted.spread.pb.PBClientFactory.__init__
(inherited documentation)

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)

gotPerspective(self, perspective)

source code 

The remote avatar or perspective (obtained each time this factory connects) is now available.

Overrides: pbutil.ReconnectingPBClientFactory.gotPerspective
(inherited documentation)

clientConnectionFailed(self, connector, reason)

source code 

Called when a connection has failed to connect.

It may be useful to call connector.connect() - this will reconnect.

Overrides: twisted.internet.protocol.ReconnectingClientFactory.clientConnectionFailed

clientConnectionLost(self, connector, reason)

source code 

Reconnecting subclasses should call with reconnecting=1.

Overrides: twisted.internet.protocol.ReconnectingClientFactory.clientConnectionLost

stopFactory(self)

source code 

This will be called before I stop listening on all Ports/Connectors.

This can be overridden to perform 'shutdown' tasks such as disconnecting database connections, closing files, etc.

It will be called, for example, before an application shuts down, if it was connected to a port. User code should not call this function directly.

Overrides: twisted.internet.protocol.Factory.stopFactory
(inherited documentation)