Package org.jcsp.net
Class LoopbackLink
- java.lang.Object
-
- org.jcsp.net.Link
-
- org.jcsp.net.LoopbackLink
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
LoopbackLink.LoopbackSerializationFilter
private class
LoopbackLink.RxLoop
The process which recieves from the stream.private class
LoopbackLink.TxLoop
The process which does transmission to the stream.private static class
LoopbackLink.TxLoopPoison
An object of this type is used by RxLoop to poison TxLoop.
-
Field Summary
Fields Modifier and Type Field Description private FilteredOne2OneChannel
loopBack
-
Fields inherited from class org.jcsp.net.Link
remoteNodeID, sendNodeID, txChannel
-
-
Constructor Summary
Constructors Constructor Description LoopbackLink()
Constructs a new loopback link for efficient network channels that are on the same JVM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected NodeID
getRemoteNodeID()
Returns the other computer's ID.protected void
runTxRxLoop()
Performs send and receive actions for the link exchanging data with the peer node.-
Methods inherited from class org.jcsp.net.Link
addTxFilter, connect, createResources, deliverReceivedObject, destroyResources, equals, exchangeNodeIDs, getPingTime, getProfile, getProtocolID, getReadSequence, getSpecifications, getTxChannel, getTxFilterCount, hashCode, obtainNodeID, performedPingTest, ping, readLinkDecision, readTestObject, removeTxFilter, run, setProfile, setSpecifications, waitForReplies, writeLinkDecision, writeTestObject
-
-
-
-
Field Detail
-
loopBack
private final FilteredOne2OneChannel loopBack
-
-
Method Detail
-
runTxRxLoop
protected void runTxRxLoop()
Description copied from class:Link
Performs send and receive actions for the link exchanging data with the peer node. This is called from this class'run
method - do not call it directly.- Overrides:
runTxRxLoop
in classLink
-
getRemoteNodeID
protected NodeID getRemoteNodeID()
Returns the other computer's ID. This method is safe to call while the process is running, however it will return null if the other computer has not yet identified itself.- Overrides:
getRemoteNodeID
in classLink
- Returns:
- ID of connected computer.
-
-