Class t.p.a._ParserHelper(AMP):

Part of twisted.protocols.amp View Source View In Hierarchy

Utility subclass to help with string parsing.
Method __init__ Create an _AmpParserBase, initializing request-response tracking state.
Method getPeer Undocumented
Method getHost Undocumented
Method ampBoxReceived An AmpBox was received. Respond to it according to its contents.
Method parse Parse some amp data stored in a file.
Method parseString Parse some amp data stored in a string.

Inherited from AMP:

Class __metaclass__ Metaclass hack to record decorators.
Method __repr__ A verbose string representation which gives us information about this AMP
Method _lock Lock this Amp instance so that no further Amp traffic may be sent.
Method _switchTo Switch this Amp instance to a new protocol. You need to do this
Method _sendBox Send a amp.Box to my peer.
Method makeConnection When a connection is first established, AMP clients send a greeting but
Method _getPeerCertificate Undocumented
Method _prepareTLS Used by StartTLSCommand to put us into the state where we don't
Method _startTLS Used by TLSBox to initiate the SSL handshake.
Method _defaultStartTLSResponder The default TLS responder doesn't specify any certificate or anything.
Method connectionLost Terminate all outstanding request deferreds, and notify nested protocol
Method dataReceived Either parse incoming data as AMP packets or relay it to our nested
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
Method proto_value String received in the 'value' state.

Inherited from StatefulStringProtocol (via AMP):

Method stringReceived Choose a protocol phase function and call it.

Inherited from Int16StringReceiver (via AMP):

Method stringReceived Override this.
Method sendString Send an int16-prefixed string to the other end of the connection.

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

Method connectionMade Called when a connection is made.

Inherited from _PauseableMixin (via AMP, Int16StringReceiver):

Method pauseProducing Undocumented
Method resumeProducing Undocumented
Method stopProducing Undocumented

Inherited from _AmpParserBase (via AMP):

Method _puke This is a terminal callback called after application code has had a
Method _nextTag Generate protocol-local serial numbers for _ask keys.
Method failAllOutgoing Call the errback on all outstanding requests awaiting responses.
Method _sendBoxCommand Send a command across the wire with the given amp.Box.
Method callRemoteString This is a low-level API, designed only for opitmizing simple messages
Method callRemote This is the primary high-level API for sending messages via AMP. Invoke it

Inherited from _DispatchMixin (via AMP, _AmpParserBase):

Method _wrapWithSerialization Wrap aCallable with its command's argument de-serialization
Method lookupFunction Return a callable to invoke when executing the named command.
Method dispatchCommand A box with a _command key was received.
def __init__(self): (source)
Create an _AmpParserBase, initializing request-response tracking state.
def getPeer(self): (source)
Undocumented
def getHost(self): (source)
Undocumented
def ampBoxReceived(self, box): (source)
An AmpBox was received. Respond to it according to its contents.
Parametersboxan AmpBox
def parse(cls, fileObj): (source)
Parse some amp data stored in a file.
ParametersfileObja file-like object.
Returnsa list of AmpBoxes encoded in the given file.
def parseString(cls, data): (source)
Parse some amp data stored in a string.
Parametersdataa str holding some amp-encoded data.
Returnsa list of AmpBoxes encoded in the given string.
API Documentation for twisted, generated by pydoctor.