class documentation

class WorkerProtocol(AMP): (source)

View In Hierarchy

The worker-side trial distributed protocol.
Method __init__ Undocumented
Method run Run a test case by name.
Method start Set up the worker, moving into given directory for tests to run in them.
Instance Variable _force​Garbage​Collection Undocumented
Instance Variable _loader Undocumented
Instance Variable _result Undocumented

Inherited from AMP:

Method __repr__ A verbose string representation which gives us information about this AMP connection.
Method connection​Lost Emit a helpful log message when the connection is lost.
Method locate​Responder Unify the implementations of CommandLocator and SimpleStringLocator to perform both kinds of dispatch, preferring CommandLocator.
Method make​Connection Emit a helpful log message when the connection is made.
Instance Variable transport Undocumented
Instance Variable _amp​Initialized Undocumented
Instance Variable _transport​Host Undocumented
Instance Variable _transport​Peer Undocumented

Inherited from BinaryBoxProtocol (via AMP):

Method data​Received Either parse incoming data as AmpBoxes or relay it to our nested protocol.
Method length​Limit​Exceeded The key length limit was exceeded. Disconnect the transport and make sure a meaningful exception is reported.
Method proto​_init String received in the 'init' state.
Method proto​_key String received in the 'key' state. If the key is empty, a complete box has been received.
Method proto​_value String received in the 'value' state.
Method send​Box Send a amp.Box to my peer.
Method unhandled​Error The buck stops here. This error was completely unhandled, time to terminate the connection.
Class Variable no​Peer​Certificate Undocumented
Instance Variable box​Receiver an IBoxReceiver provider, whose IBoxReceiver.ampBoxReceived method will be invoked for each AmpBox that is received.
Instance Variable host​Certificate Undocumented
Instance Variable inner​Protocol Undocumented
Instance Variable inner​Protocol​Client​Factory Undocumented
Instance Variable MAX​_LENGTH Undocumented
Instance Variable recvd Undocumented
Property peer​Certificate Undocumented
Method _default​Start​TLSResponder The default TLS responder doesn't specify any certificate or anything.
Method _lock​For​Switch No summary
Method _prepare​TLS Used by StartTLSCommand to put us into the state where we don't actually send things that get sent, instead we buffer them. see _sendBoxCommand.
Method _start​TLS Used by TLSBox to initiate the SSL handshake.
Method _switch​To Switch this BinaryBoxProtocol's transport to a new protocol. You need to do this 'simultaneously' on both ends of a connection; the easiest way to do this is to use a subclass of ProtocolSwitchCommand.
Method _unlock​From​Switch Unlock this locked binary protocol so that further boxes may be sent again. This is used after an attempt to switch protocols has failed for some reason.
Constant _MAX​_KEY​_LENGTH Undocumented
Constant _MAX​_VALUE​_LENGTH Undocumented
Instance Variable _current​Box Undocumented
Instance Variable _current​Key Undocumented
Instance Variable _just​Started​TLS Undocumented
Instance Variable _key​Length​Limit​Exceeded A flag which is only true when the connection is being closed because a key length prefix which was longer than allowed by the protocol was received.
Instance Variable _locked Undocumented
Instance Variable _starting​TLSBuffer Undocumented

Inherited from StatefulStringProtocol (via AMP, BinaryBoxProtocol):

Method string​Received Choose a protocol phase function and call it.
Instance Variable state Current state of the protocol. Defaults to 'init'.

Inherited from Int16StringReceiver (via AMP, BinaryBoxProtocol):

Class Variable prefix​Length Undocumented
Class Variable struct​Format Undocumented

Inherited from IntNStringReceiver (via AMP, BinaryBoxProtocol, Int16StringReceiver):

Method send​String Send a prefixed string to the other end of the connection.
Method string​Received Override this for notification when each complete string is received.
Instance Variable _compatibility​Offset the offset within _unprocessed to the next message to be parsed. (used to generate the recvd attribute)
Instance Variable _unprocessed bytes received, but not yet broken up into messages / sent to stringReceived. _compatibilityOffset must be updated when this value is updated so that the recvd attribute can be generated correctly.

Inherited from Protocol (via AMP, BinaryBoxProtocol, Int16StringReceiver, IntNStringReceiver):

Method log​Prefix Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable factory Undocumented

Inherited from BaseProtocol (via AMP, BinaryBoxProtocol, Int16StringReceiver, IntNStringReceiver, Protocol):

Method connection​Made Called when a connection is made.
Instance Variable connected Undocumented

Inherited from _PauseableMixin (via AMP, BinaryBoxProtocol, Int16StringReceiver, IntNStringReceiver):

Method pause​Producing Undocumented
Method resume​Producing Undocumented
Method stop​Producing Undocumented
Instance Variable paused Undocumented

Inherited from _DescriptorExchanger (via AMP, BinaryBoxProtocol):

Method file​Descriptor​Received Collect received file descriptors to be claimed later by Descriptor.
Method _send​File​Descriptor Assign and return the next ordinal to the given descriptor after sending the descriptor over this protocol's transport.
Instance Variable _descriptors Temporary storage for all file descriptors received. Values in this dictionary are the file descriptors (as integers). Keys in this dictionary are ordinals giving the order in which each descriptor was received. The ordering information is used to allow Descriptor to determine which is the correct descriptor for any particular usage of that argument type.
Instance Variable _get​Descriptor Undocumented
Instance Variable _receiving​Descriptor​Counter A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for fileDescriptorReceived.
Instance Variable _sending​Descriptor​Counter A no-argument callable which returns the ordinals, starting from 0. This is used to construct values for _sendFileDescriptor.

Inherited from BoxDispatcher (via AMP):

Method amp​Box​Received An AmpBox was received, representing a command, or an answer to a previously issued command (either successful or erroneous). Respond to it according to its contents.
Method call​Remote This is the primary high-level API for sending messages via AMP. Invoke it with a command and appropriate arguments to send a message to this connection's peer.
Method call​Remote​String This is a low-level API, designed only for optimizing simple messages for which the overhead of parsing is too great.
Method dispatch​Command A box with a _command key was received.
Method fail​All​Outgoing Call the errback on all outstanding requests awaiting responses.
Method start​Receiving​Boxes The given boxSender is going to start calling boxReceived on this BoxDispatcher.
Method stop​Receiving​Boxes No further boxes will be received here. Terminate all currently outstanding command deferreds with the given reason.
Method unhandled​Error This is a terminal callback called after application code has had a chance to quash any errors.
Instance Variable box​Sender an object which can send boxes, via the _sendBoxCommand method, such as an AMP instance.
Instance Variable locator an object with a CommandLocator.locateResponder method that locates a responder function that takes a Box and returns a result (either a Box or a Deferred which fires one).
Method _answer​Received An AMP box was received that answered a command previously sent with callRemote.
Method _command​Received
Method _error​Received An AMP box was received that answered a command previously sent with callRemote, with an error.
Method _next​Tag Generate protocol-local serial numbers for _ask keys.
Method _safe​Emit Emit a box, ignoring ProtocolSwitched and ConnectionLost errors which cannot be usefully handled.
Method _send​Box​Command Send a command across the wire with the given amp.Box.
Class Variable _counter Undocumented
Instance Variable _fail​All​Reason Undocumented
Instance Variable _outstanding​Requests a dictionary mapping request IDs to Deferreds which were returned for those requests.

Inherited from CommandLocator (via AMP):

Class __metaclass__ No summary
Method lookup​Function Deprecated synonym for CommandLocator.locateResponder
Method _wrap​With​Serialization Wrap aCallable with its command's argument de-serialization and result serialization logic.

Inherited from SimpleStringLocator (via AMP):

Class Variable base​Dispatch​Prefix Undocumented
def __init__(self, forceGarbageCollection=False): (source)

Undocumented

def run(self, testCase): (source)
Run a test case by name.
def start(self, directory): (source)
Set up the worker, moving into given directory for tests to run in them.
_forceGarbageCollection = (source)

Undocumented

_loader = (source)

Undocumented

_result = (source)

Undocumented