Package twisted :: Package test :: Module test_tcp :: Class ClientStartStopFactory
[show private | hide private]
[frames | no frames]

Class ClientStartStopFactory

  Factory --+        
            |        
ClientFactory --+    
                |    
  MyClientFactory --+
                    |
                   ClientStartStopFactory


Method Summary
  buildProtocol(self, addr)
Create an instance of a subclass of Protocol. (inherited from MyClientFactory)
  clientConnectionFailed(self, connector, reason)
Called when a connection has failed. (inherited from MyClientFactory)
  clientConnectionLost(self, connector, reason)
Called when a connection is lost. (inherited from MyClientFactory)
  doStart(self)
Make sure startFactory is called. (inherited from Factory)
  doStop(self)
Make sure stopFactory is called. (inherited from Factory)
  startedConnecting(self, connector)
Called when a connection has been started. (inherited from ClientFactory)
  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.

Class Variable Summary
int started
int stopped

Method Details

startFactory(self)

This will be called before I begin listening on a Port or Connector.

It will only be called once, even if the factory is connected to multiple ports.

This can be used to perform 'unserialization' tasks that are best put off until things are actually running, such as connecting to a database, opening files, etcetera.
Overrides:
twisted.internet.protocol.Factory.startFactory (inherited documentation)

stopFactory(self)

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

This can be used 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.
Overrides:
twisted.test.test_tcp.MyClientFactory.stopFactory (inherited documentation)

Class Variable Details

started

Type:
int
Value:
0                                                                      

stopped

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:29:05 2003 http://epydoc.sf.net