Package twisted :: Package internet :: Module interfaces :: Class IConsumer

[frames | no frames]

## Class IConsumer

    Interface --+
                |
               IConsumer

Known Subclasses:
  `IFinishableConsumer`

A consumer consumes data from a producer.

Method Summary
| ``registerProducer`(self, producer, streaming)` Register to receive data from a producer.
| ``unregisterProducer`(self)` Stop consuming data from a producer, without disconnecting.
| ``write`(self, data)` The producer will write data by calling this method.

Method Details

### registerProducer(self, producer, streaming)

Register to receive data from a producer.

This sets self to be a consumer for a producer. When this object runs out of data on a write() call, it will ask the producer to resumeProducing(). A producer should implement the `IProducer` interface. A push producer which is unable to pause or stop need not register or unregister.

### unregisterProducer(self)

Stop consuming data from a producer, without disconnecting.

### write(self, data)

The producer will write data by calling this method.

Generated by Epydoc 2.0 on Sat May 15 20:08:56 2004 | http://epydoc.sf.net