Package org.jcsp.lang
Class ChannelOutputImpl<T>
java.lang.Object
org.jcsp.lang.ChannelOutputImpl<T>
- All Implemented Interfaces:
ChannelOutput<T>
,Poisonable
- Direct Known Subclasses:
RejectableChannelOutputImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
channel
-
immunity
private int immunity
-
-
Constructor Details
-
ChannelOutputImpl
ChannelOutputImpl(ChannelInternals _channel, int _immunity)
-
-
Method Details
-
write
Description copied from interface:ChannelOutput
Write an Object to the channel.- Specified by:
write
in interfaceChannelOutput<T>
- Parameters:
object
- the object to write to the channel
-
poison
public void poison(int strength) 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).
-