class documentation

class ConchTestForwardingProcess(protocol.ProcessProtocol): (source)

View In Hierarchy

Manages a third-party process which launches a server.

Uses ConchTestForwardingPort to connect to the third-party server. Once ConchTestForwardingPort has disconnected, kill the process and fire a Deferred with the data received by the ConchTestForwardingPort.

Method __init__ No summary
Method connectionMade Called when a connection is made.
Method forwardingPortDisconnected The network connection has died; save the buffer of output from the network and attempt to quit the process gracefully, and then (after the reactor has spun) send it a KILL signal.
Method processEnded Fire the Deferred at self.deferred with the data collected from the ConchTestForwardingPort connection, if any.
Instance Variable buffer Undocumented
Instance Variable data Undocumented
Instance Variable deferred Set by whatever uses this object. Accessed using _getDeferred, which destroys the value so the Deferred is not fired twice. Fires when the process is terminated.
Instance Variable port Undocumented
Method _connect Connect to the server, which is often a third-party process. Tries to reconnect if it fails because we have no way of determining exactly when the port becomes available for listening -- we can only know when the process starts.
Method _ebConnect Undocumented
Method _getDeferred Undocumented
Method _reallyDie Undocumented

Inherited from ProcessProtocol:

Method childConnectionLost Called when a file descriptor associated with the child process is closed.
Method childDataReceived Called when data arrives from the child process.
Method errConnectionLost This will be called when stderr is closed.
Method errReceived Some data was received from stderr.
Method inConnectionLost This will be called when stdin is closed.
Method outConnectionLost This will be called when stdout is closed.
Method outReceived Some data was received from stdout.
Method processExited This will be called when the subprocess exits.
Class Variable transport Undocumented

Inherited from BaseProtocol (via ProcessProtocol):

Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
def __init__(self, port, data): (source)
def connectionMade(self): (source)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.

def forwardingPortDisconnected(self, buffer): (source)

The network connection has died; save the buffer of output from the network and attempt to quit the process gracefully, and then (after the reactor has spun) send it a KILL signal.

def processEnded(self, reason): (source)

Fire the Deferred at self.deferred with the data collected from the ConchTestForwardingPort connection, if any.

Undocumented

Undocumented

deferred = (source)

Set by whatever uses this object. Accessed using _getDeferred, which destroys the value so the Deferred is not fired twice. Fires when the process is terminated.

Undocumented

def _connect(self): (source)

Connect to the server, which is often a third-party process. Tries to reconnect if it fails because we have no way of determining exactly when the port becomes available for listening -- we can only know when the process starts.

def _ebConnect(self, f): (source)

Undocumented

def _getDeferred(self): (source)

Undocumented

def _reallyDie(self): (source)

Undocumented