org.jcsp.lang
public interface ChannelOutput extends Poisonable
A writing-end, conforming to this interface, is obtained from a channel by invoking its out() method.
ChannelOutput variables are used to hold channels that are going to be used only for output by the declaring process. This is a security matter -- by declaring a ChannelOutput interface, any attempt to input from the channel will generate a compile-time error. For example, the following code fragment will not compile:
Object doRead (ChannelOutput c) { return c.read (); // illegal }When configuring a CSProcess with output channels, they should be declared as ChannelOutput variables. The actual channel passed, of course, may belong to any channel class that implements ChannelOutput.
Instances of any class may be written to a channel.
void doWrite (ChannelOutput c, Object o) { c.write (o); }
SharedChannelOutput
,
ChannelInput
Modifier and Type | Method and Description |
---|---|
void |
write(Object object)
Write an Object to the channel.
|
poison
void write(Object object)
object
- the object to write to the channelSubmit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.