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

Class BotFactory

          Factory --+            
                    |            
        ClientFactory --+        
                        |        
          PBClientFactory --+    
                            |    
          Factory --+       |    
                    |       |    
        ClientFactory --+   |    
                        |   |    
ReconnectingClientFactory --+    
                            |    
  ReconnectingPBClientFactory --+
                                |
                               BotFactory


Method Summary
  __init__(self, keepaliveInterval, keepaliveTimeout)
  activity(self, res)
  checkActivity(self)
  clientConnectionFailed(self, connector, reason)
Called when a connection has failed to connect.
  clientConnectionLost(self, connector, reason)
  doKeepalive(self)
  gotPerspective(self, perspective)
The remote avatar or perspective (obtained each time this factory connects) is now available.
  keepaliveLost(self, f)
  startedConnecting(self, connector)
Called when a connection has been started.
  startTimers(self)
  stopFactory(self)
This will be called before I stop listening on all Ports/Connectors.
  stopTimers(self)
    Inherited from ReconnectingPBClientFactory
  __getstate__(self)
  clientConnectionMade(self, broker)
  doGetPerspective(self, root)
  doLogin(self, root)
  failedToGetPerspective(self, why)
The login process failed, most likely because of an authorization failure (bad password), but it is also possible that we lost the new connection before we managed to send our credentials.
  getPerspective(self, *args)
  gotRootObject(self, root)
The remote root object (obtained each time this factory connects) is now available.
  login(self, *args)
  startGettingPerspective(self, username, password, serviceName, perspectiveName, client)
  startLogin(self, credentials, client)
    Inherited from PBClientFactory
  disconnect(self)
If the factory is connected, close the connection.
  getRootObject(self)
Get root object of remote PB server.
    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 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.

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
NoneType activityTimer = None                                                                  
NoneType keepaliveInterval = None                                                                  
int keepaliveTimeout = 30                                                                    
NoneType keepaliveTimer = None                                                                  
int lastActivity = 0                                                                     
NoneType perspective = None                                                                  
int unsafeTracebacks = 1                                                                     
    Inherited from ReconnectingClientFactory
NoneType connector = None                                                                  
int continueTrying = 1                                                                     
float delay = 1.0                                                                   
NoneType maxRetries = None                                                                  
int retries = 0                                                                     
    Inherited from Factory
Implements __implemented__ = <implementedBy twisted.internet.protoc...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
bool noisy = True
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:
buildbot.pbutil.ReconnectingPBClientFactory.clientConnectionFailed (inherited documentation)

gotPerspective(self, perspective)

The remote avatar or perspective (obtained each time this factory connects) is now available.
Overrides:
buildbot.pbutil.ReconnectingPBClientFactory.gotPerspective (inherited documentation)

startedConnecting(self, connector)

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)

stopFactory(self)

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)

Class Variable Details

activityTimer

Type:
NoneType
Value:
None                                                                  

keepaliveInterval

Type:
NoneType
Value:
None                                                                  

keepaliveTimeout

Type:
int
Value:
30                                                                    

keepaliveTimer

Type:
NoneType
Value:
None                                                                  

lastActivity

Type:
int
Value:
0                                                                     

perspective

Type:
NoneType
Value:
None                                                                  

unsafeTracebacks

Type:
int
Value:
1                                                                     

Generated by Epydoc 2.1 on Sun Dec 10 22:04:45 2006 http://epydoc.sf.net