class documentation

class ClientStartStopFactory(MyClientFactory): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method startFactory This will be called before I begin listening on a Port or Connector.
Method stopFactory This will be called before I stop listening on all Ports/Connectors.
Instance Variable started Undocumented
Instance Variable stopped Undocumented
Instance Variable whenStopped Undocumented

Inherited from MyClientFactory:

Method clientConnectionFailed Called when a connection has failed to connect.
Method clientConnectionLost Called when an established connection is lost.
Instance Variable deferred Undocumented
Instance Variable failDeferred Undocumented
Instance Variable failed Undocumented
Instance Variable lostReason Undocumented
Instance Variable reason Undocumented

Inherited from MyProtocolFactoryMixin (via MyClientFactory):

Method buildProtocol Create a AccumulatingProtocol and set it up to be able to perform callbacks.
Instance Variable called A counter which is incremented each time buildProtocol is called.
Instance Variable peerAddresses A list of the addresses passed to buildProtocol.
Instance Variable protocol The most recently created AccumulatingProtocol instance which was returned from buildProtocol.
Instance Variable protocolConnectionLost When an instance of AccumulatingProtocol is created, this will be set as its closedDeferred attribute and then this attribute will be set to None so the defer.Deferred is not used by more than one protocol.
Instance Variable protocolConnectionMade When an instance of AccumulatingProtocol is connected, if this is not None, the Deferred will be called back with the protocol instance and the attribute set to None.
Instance Variable protocolFactory Factory for protocols - takes the place of the typical protocol attribute of factories (but that name is used by this class for something else).

Inherited from ClientFactory (via MyClientFactory, MyProtocolFactoryMixin):

Method startedConnecting Called when a connection has been started.

Inherited from Factory (via MyClientFactory, MyProtocolFactoryMixin, ClientFactory):

Class Method forProtocol Create a factory for the given protocol.
Method doStart Make sure startFactory is called.
Method doStop Make sure stopFactory is called.
Method logPrefix Describe this factory for log messages.
Class Variable noisy Undocumented
Instance Variable numPorts Undocumented
def __init__(self, *a, **kw): (source)
def startFactory(self): (source)

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.

def stopFactory(self): (source)

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.

Undocumented

whenStopped = (source)

Undocumented