Class CrossoverLoopbackPort
java.lang.Object
org.refcodes.component.ConnectionAutomatonImpl<PortMetrics>
org.refcodes.serial.AbstractPort<PortMetrics>
org.refcodes.serial.LoopbackPort
org.refcodes.serial.CrossoverLoopbackPort
- All Implemented Interfaces:
Flushable, Comparable<Port<?>>, Closable, Closable.CloseAutomaton, ClosedAccessor, ConnectableComponent, ConnectableComponent.ConnectableAutomaton, ConnectionComponent<PortMetrics>, ConnectionComponent.ConnectionAutomaton<PortMetrics>, ConnectionOpenable<PortMetrics>, ConnectionOpenable.ConnectionOpenAutomaton<PortMetrics>, ConnectionOpenable.ConnectionOpenBuilder<PortMetrics, Port<PortMetrics>>, ConnectionStatusAccessor, Flushable, LinkComponent, LinkComponent.LinkAutomaton, Openable, Openable.OpenAutomaton, Openable.OpenBuilder<Port<PortMetrics>>, OpenedAccessor, Availability, ByteDestination, ByteReceiver, BytesDestination, ByteSource, BytesReceiver, BytesSource, BytesTransceiver, BytesTransmitter, ByteTransceiver, ByteTransmitter, Receivable, Skippable, TimeoutInputStreamAccessor, Transmittable, AliasAccessor, InputStreamAccessor, OutputStreamAccessor, Port<PortMetrics>, PortMetricsAccessor<PortMetrics>, SegmentDestination, SegmentReceiver, SegmentSource, SegmentTransceiver, SegmentTransmitter, SerialReceiver, SerialTransceiver, SerialTransmitter
The
CrossoverLoopbackPort is an in-memory implementation of a
Port which loops its output directly to the "connected"
LoopbackPort counterpart ("other end of the wire"). 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.-
Nested Class Summary
Nested classes/interfaces inherited from interface AliasAccessor
AliasAccessor.AliasBuilder<B>, AliasAccessor.AliasMutator, AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface BytesReceiver
BytesReceiver.ReceiverInputStreamNested classes/interfaces inherited from interface BytesTransmitter
BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface Closable
Closable.CloseAutomaton, Closable.CloseBuilder<B>Nested classes/interfaces inherited from interface ClosedAccessor
ClosedAccessor.ClosedMutator, ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface ConnectableComponent
ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface ConnectionComponent
ConnectionComponent.ConnectionAutomaton<CON>, ConnectionComponent.ConnectionComponentBuilder<CON,B> Nested classes/interfaces inherited from interface ConnectionOpenable
ConnectionOpenable.ConnectionOpenAutomaton<CON>, ConnectionOpenable.ConnectionOpenBuilder<CON,B> Nested classes/interfaces inherited from interface ConnectionStatusAccessor
ConnectionStatusAccessor.ConnectionStatusMutator, ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface Flushable
Flushable.FlushBuilder<B>Nested classes/interfaces inherited from interface InputStreamAccessor
InputStreamAccessor.InputStreamBuilder<B>, InputStreamAccessor.InputStreamMutator, InputStreamAccessor.InputStreamPropertyNested classes/interfaces inherited from interface LinkComponent
LinkComponent.LinkAutomaton, LinkComponent.LinkComponentBuilder<B>Nested classes/interfaces inherited from interface Openable
Openable.OpenAutomaton, Openable.OpenBuilder<B>Nested classes/interfaces inherited from interface OpenedAccessor
OpenedAccessor.OpenedMutator, OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface OutputStreamAccessor
OutputStreamAccessor.OutputStreamBuilder<B>, OutputStreamAccessor.OutputStreamMutator, OutputStreamAccessor.OutputStreamPropertyNested classes/interfaces inherited from interface PortMetricsAccessor
PortMetricsAccessor.PortMetricsBuilder<PM,B>, PortMetricsAccessor.PortMetricsMutator<PM>, PortMetricsAccessor.PortMetricsProperty<PM> Nested classes/interfaces inherited from interface TimeoutInputStreamAccessor
TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B>, TimeoutInputStreamAccessor.TimeoutInputStreamMutator, TimeoutInputStreamAccessor.TimeoutInputStreamProperty -
Field Summary
Fields inherited from class LoopbackPort
_crossoverPort, _transmitSequenceFields inherited from class AbstractPort
_alias, _executorService, _portMetricsFields inherited from class ConnectionAutomatonImpl
_connectionComponent -
Constructor Summary
ConstructorsConstructorDescriptionCrossoverLoopbackPort(String aAlias, LoopbackPort aCounterpartPort) Constructs aCrossoverLoopbackPort.CrossoverLoopbackPort(String aAlias, LoopbackPort aCounterpartPort, ExecutorService aExecutorService) Instantiates the classCrossoverLoopbackPort.CrossoverLoopbackPort(LoopbackPort aCounterpartPort) Constructs aCrossoverLoopbackPort.CrossoverLoopbackPort(LoopbackPort aCounterpartPort, ExecutorService aExecutorService) Constructs aCrossoverLoopbackPort. -
Method Summary
Methods inherited from class LoopbackPort
available, close, getAlias, getPortMetrics, open, receiveBytes, setCrossoverPort, toString, transmitSequence, withOpen, withOpen, withOpenUnchecked, withOpenUncheckedMethods inherited from class AbstractPort
doTransmitSegment, doTransmitSegment, isOpenable, onReceiveSegment, onReceiveSegment, open, receiveSegmentMethods inherited from class ConnectionAutomatonImpl
getConnectionStatus, isClosable, isClosed, isOpenable, isOpenedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Availability
hasAvailableMethods inherited from interface BytesReceiver
getInputStream, getInputStream, receiveAllBytes, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skipMethods inherited from interface BytesSource
transmitByteMethods inherited from interface BytesTransmitter
getOutputStreamMethods inherited from interface Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface Closable.CloseAutomaton
isClosableMethods inherited from interface ClosedAccessor
isClosedMethods inherited from interface ConnectionOpenable
openUncheckedMethods inherited from interface ConnectionOpenable.ConnectionOpenAutomaton
isOpenableMethods inherited from interface ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface Flushable
flushUnchecked, isFlushableMethods inherited from interface Openable
openUncheckedMethods inherited from interface SegmentTransmitter
flushMethods inherited from interface SerialReceiver
receiveByte, receiveBytes, receiveSegmentWithin, receiveSequence, receiveSequenceWithinMethods inherited from interface SerialTransceiver
transmitSegmentMethods inherited from interface SerialTransmitter
flush, transmitBytes, transmitBytes, transmitSequenceMethods inherited from interface Skippable
skipAvailable, skipAvailableExcept, skipAvailableTill, skipAvailableTillSilenceFor, skipAvailableTillSilenceFor, skipAvailableWithin, skipAvailableWithin, skipAvailableWithin
-
Constructor Details
-
CrossoverLoopbackPort
Constructs aCrossoverLoopbackPort.- Parameters:
aCounterpartPort- The port's counterpart (other end of the line).
-
CrossoverLoopbackPort
Constructs aCrossoverLoopbackPort.- Parameters:
aAlias- The alias to use for this port.aCounterpartPort- The port's counterpart (other end of the line).
-
CrossoverLoopbackPort
Constructs aCrossoverLoopbackPort.- Parameters:
aCounterpartPort- The port's counterpart (other end of the line).aExecutorService- TheExecutorServiceto be used when invoking asynchronously working methods.
-
CrossoverLoopbackPort
public CrossoverLoopbackPort(String aAlias, LoopbackPort aCounterpartPort, ExecutorService aExecutorService) Instantiates the classCrossoverLoopbackPort.- Parameters:
aAlias- the aliasaCounterpartPort- The port's counterpart (other end of the line).aExecutorService- the executor service- See Also:
-