java.lang.Object
org.refcodes.serial.LoopbackPortTestBench
- All Implemented Interfaces:
AutoCloseable,org.refcodes.component.Openable,PortTestBench
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.component.Openable
org.refcodes.component.Openable.OpenAutomaton, org.refcodes.component.Openable.OpenBuilder<B extends org.refcodes.component.Openable.OpenBuilder<B>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Retrieves the loopback's "receiver" port.Retrieves the loopback's "transmitter" port.booleanhasPorts()Tests whether a pair of loopback ports can be provided.voidopen()voidHeuristic (normal) wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).voidwaitForPortCatchUp(long aSleepTimeMillis) Custom wait time for the given implementsation's ports to catch up after issuing a specific port operation.voidHeuristic longest wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).voidHeuristic long wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).voidHeuristic shortest wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).voidHeuristic short wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.refcodes.component.Openable
openUnchecked
-
Constructor Details
-
LoopbackPortTestBench
public LoopbackPortTestBench()
-
-
Method Details
-
hasPorts
public boolean hasPorts()Tests whether a pair of loopback ports can be provided.- Specified by:
hasPortsin interfacePortTestBench- Returns:
- True in case there is a pair of corresponding ports.
-
getReceiverPort
Retrieves the loopback's "receiver" port.- Specified by:
getReceiverPortin interfacePortTestBench- Returns:
- The according receiver port.
- Throws:
IOException- thrown in case acquiring the port failed.
-
getTransmitterPort
Retrieves the loopback's "transmitter" port.- Specified by:
getTransmitterPortin interfacePortTestBench- Returns:
- The according transmitter port.
- Throws:
IOException- thrown in case acquiring the port failed.
-
open
- Specified by:
openin interfaceorg.refcodes.component.Openable- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePortTestBench- Throws:
IOException
-
waitShortestForPortCatchUp
public void waitShortestForPortCatchUp()Heuristic shortest wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).- Specified by:
waitShortestForPortCatchUpin interfacePortTestBench
-
waitShortForPortCatchUp
public void waitShortForPortCatchUp()Heuristic short wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).- Specified by:
waitShortForPortCatchUpin interfacePortTestBench
-
waitForPortCatchUp
public void waitForPortCatchUp()Heuristic (normal) wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).- Specified by:
waitForPortCatchUpin interfacePortTestBench
-
waitLongForPortCatchUp
public void waitLongForPortCatchUp()Heuristic long wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).- Specified by:
waitLongForPortCatchUpin interfacePortTestBench
-
waitLongestForPortCatchUp
public void waitLongestForPortCatchUp()Heuristic longest wait time for the given implementsation's ports to catch up after issuing a specific port operation (the actual duration depends on the implementation's requirements).- Specified by:
waitLongestForPortCatchUpin interfacePortTestBench
-
waitForPortCatchUp
public void waitForPortCatchUp(long aSleepTimeMillis) Custom wait time for the given implementsation's ports to catch up after issuing a specific port operation.- Specified by:
waitForPortCatchUpin interfacePortTestBench- Parameters:
aSleepTimeMillis- The sleep time in milliseconds.
-