package com.bretth.codec;


/**
 * Provides definition of all classes providing producer
 * functionality.  A Producer is a class that can produce
 * outgoing data.
 * Producer implementations can assume they have been provided
 * with a Consumer and do not need to explicitly check for error
 * conditions (ie. NullPointerException) that arise from not
 * being provided with a Consumer.
 * 
 * @author Brett Henderson
 */
public interface Producer {

	/**
	 * Sets the Consumer to receive all processed data.
	 */
	public void setConsumer(Consumer consumer);
	
	
	/**
	 * This method defines whether propagation of stream control information
	 * to consumers is allowed.  This includes the finalize flag, finalize method,
	 * flush method, and reset method.
	 * By default, propagating is true.
	 */
	public void setPropagating(boolean propagating) throws CodecException;
}
