Class CrossoverLoopbackPortHub

  • All Implemented Interfaces:
    PortHub<LoopbackPort,​PortMetrics>

    public class CrossoverLoopbackPortHub
    extends LoopbackPortHub
    A CrossoverLoopbackPortHub is an in-memory implementation of a PortHub which's Port instances loop their output directly to the "connected" LoopbackPortHub counterpart Port instances ("other end of the wire"). The counterpart Port instances have the same alias so it is easy to retrieve the crossover LoopbackPort instances. This is suitable for cases using a some kind of frequent handshake between a transmitter and a receiver on the same line where we have to simulate a bidirectional in-memory communication between two ports.