Package twisted :: Package protocols :: Module dict :: Class DictLookup

[show private | hide private]
[frames | no frames]

## Class DictLookup

    BaseProtocol --+
                   |
            Protocol --+
                       |
            LineReceiver --+
                           |
                  DictClient --+
                               |
                              DictLookup

Utility class for a single dict transaction. To be used with DictLookupFactory

Method Summary
| `__init__(self)` (inherited from `DictClient`)
| ``connectionFailed`(self)` (Deprecated) (inherited from `Protocol`)
| ``connectionLost`(self, reason)` Called when the connection is shut down. (inherited from `Protocol`)
| ``connectionMade`(self)` Called when a connection is made. (inherited from `DictClient`)
| ``dataReceived`(self, data)` Protocol.dataReceived. (inherited from `LineReceiver`)
| ``defineDone`(self, result)` override to catch succesful DEFINE
| ``defineFailed`(self, reason)` override to catch reasonable failure responses to DEFINE
| ``dictCode_150_define`(self, line)` n definitions retrieved (inherited from `DictClient`)
| ``dictCode_151_define`(self, line)` Definition text follows (inherited from `DictClient`)
| ``dictCode_152_match`(self, line)` n matches found, text follows (inherited from `DictClient`)
| ``dictCode_220_conn`(self, line)` Greeting message (inherited from `DictClient`)
| ``dictCode_221_ready`(self, line)` We are about to get kicked off, do nothing (inherited from `DictClient`)
| ``dictCode_250_define`(self, line)` ok (inherited from `DictClient`)
| ``dictCode_250_match`(self, line)` ok (inherited from `DictClient`)
| `dictCode_420_conn(self)` (inherited from `DictClient`)
| `dictCode_421_conn(self)` (inherited from `DictClient`)
| `dictCode_530_conn(self)` (inherited from `DictClient`)
| ``dictCode_550_define`(self, line)` Invalid database (inherited from `DictClient`)
| ``dictCode_550_match`(self, line)` Invalid database (inherited from `DictClient`)
| ``dictCode_551_match`(self, line)` Invalid strategy (inherited from `DictClient`)
| ``dictCode_552_define`(self, line)` No match (inherited from `DictClient`)
| ``dictCode_552_match`(self, line)` No match (inherited from `DictClient`)
| ``dictCode_default`(self, line)` Unkown message (inherited from `DictClient`)
| ``dictCode_text_define`(self, line)` A line of definition text received (inherited from `DictClient`)
| ``dictCode_text_match`(self, line)` One line of match text received (inherited from `DictClient`)
| ``dictConnected`(self)` override to be notified when the server is ready to accept commands
| ``lineLengthExceeded`(self, line)` Called when the maximum line length has been reached. (inherited from `LineReceiver`)
| ``lineReceived`(self, line)` Override this for when each line is received. (inherited from `DictClient`)
| ``matchDone`(self, result)` override to catch succesful MATCH
| ``matchFailed`(self, reason)` override to catch resonable failure responses to MATCH
| ``protocolError`(self, reason)` override to catch unexpected dict protocol conditions
| ``rawDataReceived`(self, data)` Override this for when raw data is received. (inherited from `LineReceiver`)
| ``sendDefine`(self, database, word)` Send a dict DEFINE command (inherited from `DictClient`)
| ``sendLine`(self, line)` Throw up if the line is longer than 1022 characters (inherited from `DictClient`)
| ``sendMatch`(self, database, strategy, word)` Send a dict MATCH command (inherited from `DictClient`)
| ``setLineMode`(self, extra)` Sets the line-mode of this receiver. (inherited from `LineReceiver`)
| ``setRawMode`(self)` Sets the raw mode of this receiver. (inherited from `LineReceiver`)

Method Details

### defineDone(self, result)

override to catch succesful DEFINE

  Overrides:
    `twisted.protocols.dict.DictClient.defineDone` (inherited documentation)

### defineFailed(self, reason)

override to catch reasonable failure responses to DEFINE

  Overrides:
    `twisted.protocols.dict.DictClient.defineFailed` (inherited documentation)

### dictConnected(self)

override to be notified when the server is ready to accept commands

  Overrides:
    `twisted.protocols.dict.DictClient.dictConnected` (inherited documentation)

### matchDone(self, result)

override to catch succesful MATCH

  Overrides:
    `twisted.protocols.dict.DictClient.matchDone` (inherited documentation)

### matchFailed(self, reason)

override to catch resonable failure responses to MATCH

  Overrides:
    `twisted.protocols.dict.DictClient.matchFailed` (inherited documentation)

### protocolError(self, reason)

override to catch unexpected dict protocol conditions

  Overrides:
    `twisted.protocols.dict.DictClient.protocolError` (inherited documentation)

Generated by Epydoc 1.1 on Sat Feb 15 21:17:57 2003 | http://epydoc.sf.net