Package buildslave :: 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, buildmaster_host, port, keepaliveInterval, 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)
Subclass or monkey-patch this method to be alerted whenever there is active communication between the master and slave.
source code
 
stopFactory(self)
This will be called before I stop listening on all Ports/Connectors.
source code

Inherited from pbutil.ReconnectingPBClientFactory: clientConnectionMade, doLogin, failedToGetPerspective, gotRootObject, login, startHungConnectionTimer, startLogin, stopHungConnectionTimer

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

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

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

Class Variables
  keepaliveInterval = None
hash(x)
  maxDelay = 300
Maximum number of seconds between connection attempts.
  keepaliveTimer = None
hash(x)
  unsafeTracebacks = 1
  perspective = None
hash(x)

Inherited from pbutil.ReconnectingPBClientFactory: HUNG_CONNECTION_TIMEOUT, hungConnectionTimer

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

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

Instance Variables

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

Method Details

__init__(self, buildmaster_host, port, keepaliveInterval, 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)