Class SharedChannelOutputImpl<T>
java.lang.Object
org.jcsp.lang.SharedChannelOutputImpl<T>
- All Implemented Interfaces:
ChannelOutput<T>, Poisonable, SharedChannelOutput<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
channel
-
immunity
private int immunity
-
-
Constructor Details
-
SharedChannelOutputImpl
SharedChannelOutputImpl(ChannelInternals<T> _channel, int _immunity)
-
-
Method Details
-
write
Description copied from interface:ChannelOutputWrite an Object to the channel.- Specified by:
writein interfaceChannelOutput<T>- Parameters:
object- the object to write to the channel
-
poison
public void poison(int strength) Description copied from interface:PoisonableThis 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:
poisonin interfacePoisonable- Parameters:
strength- the strength of the poison (must be >= 0).
-