Package org.jcsp.net2
Class Link.RxLoop
- java.lang.Object
-
- org.jcsp.net2.Link.RxLoop
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList
incomingEnrolledBarriers
This is the list of barrier server ends that this Link has received an enroll for.private java.io.DataInputStream
inputStream
The input stream receiving messages from the opposite remote nodeprivate ChannelOutput
toTxProcess
This is the channel connected to the Link's TX process.
-
Constructor Summary
Constructors Constructor Description RxLoop(ChannelOutput out, java.io.DataInputStream stream)
Constructor for the RX part of the Link
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
The point here is to try and deal with any message that may come into the Node.
-
-
-
Field Detail
-
toTxProcess
private final ChannelOutput toTxProcess
This is the channel connected to the Link's TX process. We retain this in the RX process for messages such as reject to be sent directly back to the remote node, and to ease the communication mechanism. Any message that requires an acknowledgement has this channel attached to it for simplicity.
-
inputStream
private final java.io.DataInputStream inputStream
The input stream receiving messages from the opposite remote node
-
incomingEnrolledBarriers
private final java.util.ArrayList incomingEnrolledBarriers
This is the list of barrier server ends that this Link has received an enroll for. We retain this to allow server ends to be notified when the Link goes down, letting them know that one of the client ends have gone
-
-
Constructor Detail
-
RxLoop
RxLoop(ChannelOutput out, java.io.DataInputStream stream)
Constructor for the RX part of the Link- Parameters:
out
- The Channel connected to the TX part of the Linkstream
- The input stream used to receive messages upon
-
-
Method Detail
-
run
public void run()
The point here is to try and deal with any message that may come into the Node. This involves a great deal of choice, and therefore this run method looks quite complicated. However, splitting the switch statements into parts should allow a good idea of exactly what is going on.
-
-