Package org.jcsp.lang
Class ChannelInputWrapper
- java.lang.Object
-
- org.jcsp.lang.ChannelInputWrapper
-
- All Implemented Interfaces:
ChannelInput
,Poisonable
- Direct Known Subclasses:
FilteredChannelInputWrapper
public class ChannelInputWrapper extends java.lang.Object implements ChannelInput
Deprecated.There is no longer any need to use this class, after the 1.1 class reorganisation.Defines a wrapper to go around a channel input end. This wrapper allows a channel end to be given away without any risk of the user of that end casting it to a channel output because they cannot gain access to the actual channel end.
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelInput
in
Deprecated.The actual channel end.
-
Constructor Summary
Constructors Constructor Description ChannelInputWrapper(ChannelInput in)
Deprecated.Constructs a new wrapper around the given channel end.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
endRead()
Deprecated.Ends an extended rendezvousvoid
poison(int strength)
Deprecated.This injects poison into the channel.java.lang.Object
read()
Deprecated.Reads a value from the channel.java.lang.Object
startRead()
Deprecated.Begins an extended rendezvous
-
-
-
Field Detail
-
in
private ChannelInput in
Deprecated.The actual channel end.
-
-
Constructor Detail
-
ChannelInputWrapper
public ChannelInputWrapper(ChannelInput in)
Deprecated.Constructs a new wrapper around the given channel end.- Parameters:
in
- the existing channel end.
-
-
Method Detail
-
read
public java.lang.Object read()
Deprecated.Reads a value from the channel.- Specified by:
read
in interfaceChannelInput
- Returns:
- the value read.
- See Also:
ChannelInput
-
startRead
public java.lang.Object startRead()
Deprecated.Begins an extended rendezvous- Specified by:
startRead
in interfaceChannelInput
- Returns:
- The object read from the channel
- See Also:
ChannelInput.startRead
-
endRead
public void endRead()
Deprecated.Ends an extended rendezvous- Specified by:
endRead
in interfaceChannelInput
- See Also:
ChannelInput.endRead
-
poison
public void poison(int strength)
Deprecated.Description copied from interface:Poisonable
This injects poison into the channel. If the channel was not explicitly constructed to be poisonable or if the strength of poison is not greater than the channel immunity level, the poison will have no effect.- Specified by:
poison
in interfacePoisonable
- Parameters:
strength
- the strength of the poison (must be >= 0).
-
-