All Packages Class Hierarchy This Package Previous Next Index
The ChannelOutput interface should be used to hold references to Channels when they are only going to be used for writing data to. By using the ChannelOutput interface any attempt to read from the Channel using the reference to a ChannelOutput type will generate a compile time error. The following code fragment would not compile.
Object doRead(ChannelOutput c) { return c.read(); // illegalThis interface should be used to pass Channels around where processes only require read access to the Channel.
Instances of any Class may be written to a Channel.
void doWrite(ChannelOutput c, Object o) { c.write(o); }
public abstract void write(Object object)
All Packages Class Hierarchy This Package Previous Next Index