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