- All Superinterfaces:
AutoCloseable,org.refcodes.component.Openable
- All Known Implementing Classes:
LoopbackPortTestBench
The
PortTestBench provides a test bench merely for diagnostic
purposes. Test code using the PortTestBench can be tested against
exchangeable implementation of the 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>> -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Port<?>Retrieves the loopback's "receiver" port.Port<?>Retrieves the loopback's "transmitter" port.booleanhasPorts()Tests whether a pair of loopback ports can be provided.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 interface org.refcodes.component.Openable
open, openUnchecked
-
Method Details
-
hasPorts
boolean hasPorts()Tests whether a pair of loopback ports can be provided.- Returns:
- True in case there is a pair of corresponding ports.
-
getReceiverPort
Retrieves the loopback's "receiver" port.- Returns:
- The according receiver port.
- Throws:
IOException- thrown in case acquiring the port failed.IllegalStateException- thrown case there is no such loopback port pair.
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
getTransmitterPort
Retrieves the loopback's "transmitter" port.- Returns:
- The according transmitter port.
- Throws:
IOException- thrown in case acquiring the port failed.IllegalStateException- thrown case there is no such loopback port pair.
-
waitShortestForPortCatchUp
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). -
waitShortForPortCatchUp
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). -
waitForPortCatchUp
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). -
waitLongForPortCatchUp
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). -
waitLongestForPortCatchUp
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). -
waitForPortCatchUp
void waitForPortCatchUp(long aSleepTimeMillis) Custom wait time for the given implementsation's ports to catch up after issuing a specific port operation.- Parameters:
aSleepTimeMillis- The sleep time in milliseconds.
-