All Packages Class Hierarchy This Package Previous Next Index
Class jcsp.util.buildingblocks.Demultiplexer
java.lang.Object
|
+----jcsp.util.buildingblocks.Demultiplexer
- public final class Demultiplexer
- extends Object
- implements CSProcess
Process Diagram
+---------------+ out[1]
| |-------->
in | | :
--->| Demultiplexer | :
| | out[n]
| |-------->
+---------------+
Description
The Demultiplexer class is a process which has an infinite loop that waits
for an Integer to be sent down the in Channel, upon receiving an Integer
it will then wait for an Object of any type to be sent down the in Channel.
The Integer will be used as an index to the out Channels array, the Object
will then be written down this Channel.
This Process is used to convert the single stream of Objects sent from
the Multiplexer Process down the in Channel back to individual Channels.
Channel Protocols
Input Channels |
in |
java.lang.Integer,java.lang.Object |
The in Channel has a Integer sent down followed by an Object of any type.
|
Output Channels |
out |
java.lang.Object |
The out Channel writes the Object written as the second Object
down the in Channel.
|
- Author:
- P.D.Austin
- See Also:
- Multiplexer
-
Demultiplexer(ChannelInput, ChannelOutput[])
- Construct a new Demultiplexer process with the input Channel in and the output
Channels out.
-
run()
- The main body of this process.
Demultiplexer
public Demultiplexer(ChannelInput in,
ChannelOutput out[])
- Construct a new Demultiplexer process with the input Channel in and the output
Channels out. The ordering of the Channels in the out array make
no difference to the functionality of this process.
- Parameters:
- in - The input channel
- out - The output Channels
run
public void run()
- The main body of this process.
All Packages Class Hierarchy This Package Previous Next Index