Package org.jcsp.plugNplay
Class BlackHole
- java.lang.Object
-
- org.jcsp.plugNplay.BlackHole
-
- All Implemented Interfaces:
CSProcess
public final class BlackHole extends java.lang.Object implements CSProcess
Black holes anything sent to it.Process Diagram
Description
BlackHole is a process that accepts everything sent to it. This class can be used to ignore the output from a process while ensuring that the data is always read from the channel.Note: this functionality is (more efficiently) provided by a
BlackHoleChannel
.Channel Protocols
Input Channels in java.lang.Object The in Channel can accept data of any Class.
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelInput
in
The input Channel
-
Constructor Summary
Constructors Constructor Description BlackHole(ChannelInput in)
Construct a new BlackHole process with the input Channel in.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
The main body of this process.
-
-
-
Field Detail
-
in
private ChannelInput in
The input Channel
-
-
Constructor Detail
-
BlackHole
public BlackHole(ChannelInput in)
Construct a new BlackHole process with the input Channel in.- Parameters:
in
- the input channel
-
-