t.i.e._WrappingFactory(ClientFactory) : class documentation

Part of twisted.internet.endpoints View Source View In Hierarchy

Wrap a factory in order to wrap the protocols it builds.
Instance Variables_wrappedFactoryA provider of IProtocolFactory whose buildProtocol method will be called and whose resulting protocol will be wrapped.
_onConnectionAn Deferred that fires when the protocol is connected
Method __init__ No summary
Method doStart Start notifications are passed straight through to the wrapped factory.
Method doStop Stop notifications are passed straight through to the wrapped factory.
Method buildProtocol Proxy buildProtocol to our self._wrappedFactory or errback the self._onConnection Deferred.
Method clientConnectionFailed Errback the self._onConnection Deferred when the client connection fails.

Inherited from ClientFactory:

Method startedConnecting Called when a connection has been started.
Method clientConnectionLost Called when an established connection is lost.

Inherited from Factory (via ClientFactory):

Method logPrefix Describe this factory for log messages.
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.
def __init__(self, wrappedFactory, canceller): (source)
ParameterswrappedFactoryA provider of IProtocolFactory whose buildProtocol method will be called and whose resulting protocol will be wrapped.
cancellerAn object that will be called to cancel the self._onConnection Deferred
def doStart(self): (source)
Start notifications are passed straight through to the wrapped factory.
def doStop(self): (source)
Stop notifications are passed straight through to the wrapped factory.
def buildProtocol(self, addr): (source)
Proxy buildProtocol to our self._wrappedFactory or errback the self._onConnection Deferred.
ReturnsAn instance of _WrappingProtocol or None
def clientConnectionFailed(self, connector, reason): (source)
Errback the self._onConnection Deferred when the client connection fails.
API Documentation for Twisted, generated by pydoctor at 2012-02-14 18:17:43.