/**
 * This interface declares an out channel, which is a channel where we can
 * write data.
 * @author fpereira
 *
 */
public interface OutChannel {
  /**
   * Write the data into the channel.
   * @param data The data to be written.
   * @throws Exception in case we fail to write the data.
   */
  void write(int data) throws Exception;

  /**
   * Call it once we are done sending the data.
   * @throws Exception in case we fail to close the channel.
   */
  void done() throws Exception;
}
