Package buildbot :: Module interfaces :: Class IStatusLogConsumer
[frames] | no frames]

Class IStatusLogConsumer

source code

zope.interface.Interface --+
                           |
                          IStatusLogConsumer

I am an object which can be passed to IStatusLog.subscribeConsumer(). I represent a target for writing the contents of an IStatusLog. This differs from a regular IStatusReceiver in that it can pause the producer. This makes it more suitable for use in streaming data over network sockets, such as an HTTP request. Note that the consumer can only pause the producer until it has caught up with all the old data. After that point, pauseProducing is ignored and all new output from the log is sent directoy to the consumer.

Instance Methods
 
registerProducer(producer, streaming)
A producer is being hooked up to this consumer.
source code
 
unregisterProducer()
The previously-registered producer has been removed.
source code
 
writeChunk(chunk)
A chunk (i.e.
source code
 
finish()
The log has finished sending chunks to the consumer.
source code
Class Variables
  __bases__ = (<InterfaceClass zope.interface.Interface>)
  __identifier__ = 'buildbot.interfaces.IStatusLogConsumer'
  __iro__ = (<InterfaceClass buildbot.interfaces.IStatusLogConsu...
  __name__ = 'IStatusLogConsumer'
  __sro__ = (<InterfaceClass buildbot.interfaces.IStatusLogConsu...
  dependents = <WeakKeyDictionary at 43407264>
Method Details

registerProducer(producer, streaming)

source code 

A producer is being hooked up to this consumer. The consumer only has to handle a single producer. It should send .pauseProducing and .resumeProducing messages to the producer when it wants to stop or resume the flow of data. 'streaming' will be set to True because the producer is always a PushProducer.

unregisterProducer()

source code 

The previously-registered producer has been removed. No further pauseProducing or resumeProducing calls should be made. The consumer should delete its reference to the Producer so it can be released.

writeChunk(chunk)

source code 

A chunk (i.e. a tuple of (channel, text)) is being written to the consumer.


Class Variable Details

__iro__

Value:
(<InterfaceClass buildbot.interfaces.IStatusLogConsumer>,
 <InterfaceClass zope.interface.Interface>)

__sro__

Value:
(<InterfaceClass buildbot.interfaces.IStatusLogConsumer>,
 <InterfaceClass zope.interface.Interface>)