Class t.s.p.PBClientFactory(protocol.ClientFactory):

Part of twisted.spread.pb View Source View In Hierarchy

Client factory for PB brokers.

As with all client factories, use with reactor.connectTCP/SSL/etc.. getPerspective and getRootObject can be called either before or after the connect.
Method __init__ Undocumented
Method _reset Undocumented
Method _failAll Undocumented
Method clientConnectionFailed Called when a connection has failed to connect.
Method clientConnectionLost Reconnecting subclasses should call with reconnecting=1.
Method clientConnectionMade Undocumented
Method getRootObject Get root object of remote PB server.
Method disconnect If the factory is connected, close the connection.
Method _cbSendUsername Undocumented
Method _cbResponse Undocumented
Method login Login and get perspective from remote PB server.

Inherited from ClientFactory:

Method startedConnecting Called when a connection has been started.

Inherited from Factory (via ClientFactory):

Method doStart Make sure startFactory is called.
Method doStop Make sure stopFactory is called.
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.
Method buildProtocol Create an instance of a subclass of Protocol.
def __init__(self): (source)
Undocumented
def _reset(self): (source)
Undocumented
def _failAll(self, reason): (source)
Undocumented
def clientConnectionFailed(self, connector, reason): (source)

Called when a connection has failed to connect.

It may be useful to call connector.connect() - this will reconnect.
Parametersreason(type: twisted.python.failure.Failure )
def clientConnectionLost(self, connector, reason, reconnecting=0): (source)
Reconnecting subclasses should call with reconnecting=1.
def clientConnectionMade(self, broker): (source)
Undocumented
def getRootObject(self): (source)
Get root object of remote PB server.
ReturnsDeferred of the root object.
def disconnect(self): (source)

If the factory is connected, close the connection.

Note that if you set up the factory to reconnect, you will need to implement extra logic to prevent automatic reconnection after this is called.
def _cbSendUsername(self, root, username, password, client): (source)
Undocumented
def _cbResponse(self, (challenge, challenger), password, client): (source)
Undocumented
def login(self, credentials, client=None): (source)

Login and get perspective from remote PB server.

Currently only credentials implementing twisted.cred.credentials.IUsernamePassword are supported.
ReturnsDeferred of RemoteReference to the perspective.
API Documentation for twisted, generated by pydoctor.