|
CSP for Java (JCSP) 1.1-rc2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChannelOutput
This defines the interface for writing to object channels.
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); }
ChannelInput
Method Summary | |
---|---|
void |
write(Object object)
Write an Object to the channel. |
Methods inherited from interface org.jcsp.lang.Poisonable |
---|
poison |
Method Detail |
---|
void write(Object object)
object
- the object to write to the channel
|
CSP for Java (JCSP) 1.1-rc2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |