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