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 classLoopbackLink.LoopbackSerializationFilterprivate classLoopbackLink.RxLoopThe process which recieves from the stream.private classLoopbackLink.TxLoopThe process which does transmission to the stream.private static classLoopbackLink.TxLoopPoisonAn object of this type is used by RxLoop to poison TxLoop.
-
Field Summary
Fields Modifier and Type Field Description private FilteredOne2OneChannelloopBack-
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 NodeIDgetRemoteNodeID()Returns the other computer's ID.protected voidrunTxRxLoop()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:LinkPerforms send and receive actions for the link exchanging data with the peer node. This is called from this class'runmethod - do not call it directly.- Overrides:
runTxRxLoopin 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:
getRemoteNodeIDin classLink- Returns:
- ID of connected computer.
-
-