|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This defines the interface for writing to integer channels.
ChannelOutputInt variables are used to hold integer channels that are going to be used only for output by the declaring process. This is a security matter -- by declaring a ChannelOutputInt interface, any attempt to input from the channel will generate a compile-time error. For example, the following code fragment will not compile:
int doRead (ChannelOutputInt c) { return c.read (); // illegal }When configuring a CSProcess with output integer channels, they should be declared as ChannelOutputInt variables. The actual channel passed, of course, may belong to any channel class that implements ChannelOutputInt.
void doWrite (ChannelOutputInt c, int i) { c.write (i); }
ChannelInputInt
Method Summary | |
void |
write(int i)
Write an int to the channel. |
Method Detail |
public void write(int i)
i
- the integer to write to the channel
|
CSP for Java (JCSP) 1.0-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |