001    /*
002     * InputChannel.java
003     *
004     * Developed for the "Rethinking CS101" project. See http://www.cs101.org, the
005     * CS101 homepage or email las@olin.edu.
006     *
007     * Please do not redistribute without obtaining permission.
008     */
009    
010    package nodenet;
011    
012    /**
013     * This is the interface to recieve objects from a channel.  It defines one
014     * method, <code>readObject()</code>. <p>
015     *
016     * @author Todd C. Parnell, tparnell@ai.mit.edu
017     * @version $Id: InputChannel.java,v 1.3 2004/01/14 21:43:17 gus Exp $
018     */
019    public interface InputChannel {
020        
021        /**
022         * Attempt to get an object in the channel.
023         *
024         * @return the oldest object in the channel
025         *
026         * @throws ChannelEmptyException if no objects are available in the
027         * channel
028         *
029         * @throws ChannelDisabledException if the user has disabled the
030         * channel
031         */
032        public Object readObject() throws ChannelEmptyException,
033        ChannelDisabledException;
034    }
035    
036    /*
037     * $Log: InputChannel.java,v $
038     * Revision 1.3  2004/01/14 21:43:17  gus
039     * more javadoc, plus reformat
040     *
041     * Revision 1.2  2004/01/14 20:23:21  gus
042     * Javadoc and comment cleanup
043     *
044     * Revision 1.1  2002/06/13 17:33:21  gus
045     * Moved all java files into the nodenet directory (who let them out anyway?)
046     *
047     * Revision 1.1.1.1  2002/06/05 21:56:35  root
048     * CS101 comes to Olin finally.
049     *
050     * Revision 1.4  2000/05/09 06:03:54  mharder
051     * Changed packagename from nodeNet to nodenet.
052     *
053     * Revision 1.3  1999/08/04 09:08:51  jsmthng
054     * Added javadoc comments to InputChannelVector and OutputChannelVector;
055     * finished updating the rest of the nodeNet package to reflect new
056     * changes in name and code.
057     *
058     * Modified index.html to reflect the new nodeNet code, as well as to
059     * clarify some parts of the problem set.
060     *
061     * Revision 1.1  1999/07/30 01:09:21  jsmthng
062     * Renaming BinSort package to nodeNet; moving directories and files as
063     * necessary.
064     *
065     * Revision 1.3  1998/08/12 19:29:35  tparnell
066     * Another pass after comments from las & natashao.  Added support to
067     * dynamically add NodeBehaviors.  Add keyboard shortcuts to menus.  Added
068     * workaround to jdk bug relating to lighweight components.  Misc other
069     * bugfixes.
070     *
071     * Revision 1.3  1998/08/10 17:45:50  tparnell
072     * Revision to use JDK1.2 and Swing.  Redesign of GUI.  Removed old kludge
073     * for file I/O and replaced with object serialization.  Channel no longer
074     * requires animacy.  Removed unnessary dependencies between classes.
075     * Added ability to configure channel's latency and capacity.  Added
076     * javadoc to all files.  General code cleanup.
077     *
078     */