public class AltingChannelInputWrapper<T> extends AltingChannelInput<T>
AltingChannelInput
Modifier and Type | Field and Description |
---|---|
private AltingChannelInput<T> |
channel
Deprecated.
The real channel which this object wraps.
|
Modifier | Constructor and Description |
---|---|
protected |
AltingChannelInputWrapper()
Deprecated.
This constructor does not wrap a channel.
|
|
AltingChannelInputWrapper(AltingChannelInput<T> channel)
Deprecated.
Creates a new AltingChannelInputWrapper which wraps the specified
channel.
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
disable()
Deprecated.
Disables the guard for selection.
|
(package private) boolean |
enable(Alternative alt)
Deprecated.
Returns true if the event is ready.
|
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.
|
T |
read()
Deprecated.
Read an Object from the channel.
|
protected void |
setChannel(AltingChannelInput<T> chan)
Deprecated.
Sets the real channel to be used.
|
T |
startRead()
Deprecated.
Begins an extended rendezvous
|
private AltingChannelInput<T> channel
public AltingChannelInputWrapper(AltingChannelInput<T> channel)
protected AltingChannelInputWrapper()
setChannel(AltingChannelInput)
.protected AltingChannelInput getChannel()
protected void setChannel(AltingChannelInput<T> chan)
chan
- the real channel to be used.public T read()
public T 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<T>
boolean enable(Alternative alt)
Note: this method should only be called by the Alternative class
boolean disable()
Note: this method should only be called by the Alternative class
public void poison(int strength)
Poisonable
strength
- the strength of the poison (must be >= 0).