Package org.jcsp.lang
Class ChannelOutputWrapper
- java.lang.Object
-
- org.jcsp.lang.ChannelOutputWrapper
-
- All Implemented Interfaces:
ChannelOutput,Poisonable
- Direct Known Subclasses:
FilteredChannelOutputWrapper
public class ChannelOutputWrapper extends java.lang.Object implements ChannelOutput
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 output 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 input because they cannot gain access to the actual channel end.
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelOutputoutDeprecated.The actual channel end.
-
Constructor Summary
Constructors Constructor Description ChannelOutputWrapper(ChannelOutput out)Deprecated.Creates a new wrapper for the given channel end.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidpoison(int strength)Deprecated.This injects poison into the channel.voidwrite(java.lang.Object o)Deprecated.Writes a value to the channel.
-
-
-
Field Detail
-
out
private ChannelOutput out
Deprecated.The actual channel end.
-
-
Constructor Detail
-
ChannelOutputWrapper
public ChannelOutputWrapper(ChannelOutput out)
Deprecated.Creates a new wrapper for the given channel end.- Parameters:
out- the existing channel end.
-
-
Method Detail
-
write
public void write(java.lang.Object o)
Deprecated.Writes a value to the channel.- Specified by:
writein interfaceChannelOutput- Parameters:
o- the value to write.- See Also:
ChannelOutput
-
poison
public void poison(int strength)
Deprecated.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).
-
-