'Register a producer.'

def registerProducer(self, producer, streaming):

    if self.producer:
        raise ValueError(('registering    producer    %s    before    previous    one    (%s)    was    unregistered' % (producer, self.producer)))
    self.streamingProducer = streaming
    self.producer = producer
    self.channel.registerProducer(producer, streaming)
