|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jcsp.lang.Guard org.jcsp.lang.AltingChannelInput org.jcsp.lang.AltingChannelInputWrapper
public class AltingChannelInputWrapper
This class wraps an ALTable channel so that only the reading part is available to the caller. Writes are impossible unless you subclass this (and use getChannel()) or keep a reference to the original channel.
AltingChannelInput
Constructor Summary | |
---|---|
protected |
AltingChannelInputWrapper()
Deprecated. This constructor does not wrap a channel. |
|
AltingChannelInputWrapper(AltingChannelInput channel)
Deprecated. Creates a new AltingChannelInputWrapper which wraps the specified channel. |
Method Summary | |
---|---|
void |
endRead()
Deprecated. Ends an extended rendezvous |
protected AltingChannelInput |
getChannel()
Deprecated. Get the real channel. |
boolean |
pending()
Deprecated. Returns whether there is data pending on this channel. |
void |
poison(int strength)
Deprecated. This injects poison into the channel. |
Object |
read()
Deprecated. Read an Object from the channel. |
protected void |
setChannel(AltingChannelInput chan)
Deprecated. Sets the real channel to be used. |
Object |
startRead()
Deprecated. Begins an extended rendezvous |
Methods inherited from class org.jcsp.lang.Guard |
---|
schedule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AltingChannelInputWrapper(AltingChannelInput channel)
protected AltingChannelInputWrapper()
setChannel(AltingChannelInput)
.
Method Detail |
---|
protected AltingChannelInput getChannel()
protected void setChannel(AltingChannelInput chan)
chan
- the real channel to be used.public Object read()
public Object startRead()
ChannelInput.startRead
public void endRead()
ChannelInput.endRead
public boolean pending()
Note: if there is, it won't go away until you read it. But if there isn't, there may be some by the time you check the result of this method.
pending
in class AltingChannelInput
public void poison(int strength)
Poisonable
strength
- the strength of the poison (must be >= 0).
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |