- All Superinterfaces:
org.refcodes.io.Availability,org.refcodes.io.ByteDestination,org.refcodes.io.ByteReceiver,org.refcodes.io.BytesDestination,org.refcodes.io.ByteSource,org.refcodes.io.BytesReceiver,org.refcodes.io.BytesSource,org.refcodes.io.BytesTransceiver,org.refcodes.io.BytesTransmitter,org.refcodes.io.ByteTransceiver,org.refcodes.io.ByteTransmitter,org.refcodes.component.Closable,org.refcodes.component.Closable.CloseAutomaton,org.refcodes.component.ClosedAccessor,org.refcodes.component.ConnectableComponent,org.refcodes.component.ConnectableComponent.ConnectableAutomaton,org.refcodes.component.ConnectionStatusAccessor,Flushable,org.refcodes.component.Flushable,org.refcodes.mixin.InputStreamAccessor,org.refcodes.component.LinkComponent,org.refcodes.component.LinkComponent.LinkAutomaton,org.refcodes.component.Openable,org.refcodes.component.Openable.OpenAutomaton,org.refcodes.component.OpenedAccessor,org.refcodes.mixin.OutputStreamAccessor,org.refcodes.io.Receivable,SegmentDestination,SegmentReceiver,SegmentSource,SegmentTransceiver,SegmentTransmitter,SerialReceiver,SerialTransmitter,org.refcodes.io.Skippable,org.refcodes.io.TimeoutInputStreamAccessor,org.refcodes.io.Transmittable
- All Known Subinterfaces:
Port<PM>
- All Known Implementing Classes:
AbstractPort,AbstractPortDecorator,CrossoverLoopbackPort,LoopbackPort
public interface SerialTransceiver
extends org.refcodes.io.BytesTransceiver, SegmentTransceiver, SerialTransmitter, SerialReceiver
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.io.BytesReceiver
org.refcodes.io.BytesReceiver.ReceiverInputStreamNested classes/interfaces inherited from interface org.refcodes.io.BytesTransmitter
org.refcodes.io.BytesTransmitter.TransmitterOutputStreamNested classes/interfaces inherited from interface org.refcodes.component.Closable
org.refcodes.component.Closable.CloseAutomaton, org.refcodes.component.Closable.CloseBuilder<B extends org.refcodes.component.Closable.CloseBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.component.ClosedAccessor
org.refcodes.component.ClosedAccessor.ClosedMutator, org.refcodes.component.ClosedAccessor.ClosedPropertyNested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomatonNested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusPropertyNested classes/interfaces inherited from interface org.refcodes.component.Flushable
org.refcodes.component.Flushable.FlushBuilder<B extends org.refcodes.component.Flushable.FlushBuilder<B>>Nested classes/interfaces inherited from interface org.refcodes.mixin.InputStreamAccessor
org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<B extends org.refcodes.mixin.InputStreamAccessor.InputStreamBuilder<?>>, org.refcodes.mixin.InputStreamAccessor.InputStreamMutator, org.refcodes.mixin.InputStreamAccessor.InputStreamPropertyNested classes/interfaces inherited from interface org.refcodes.component.LinkComponent
org.refcodes.component.LinkComponent.LinkAutomaton, org.refcodes.component.LinkComponent.LinkComponentBuilder<B extends org.refcodes.component.LinkComponent.LinkComponentBuilder<B>>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>>Nested classes/interfaces inherited from interface org.refcodes.component.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.OutputStreamAccessor
org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<B extends org.refcodes.mixin.OutputStreamAccessor.OutputStreamBuilder<?>>, org.refcodes.mixin.OutputStreamAccessor.OutputStreamMutator, org.refcodes.mixin.OutputStreamAccessor.OutputStreamPropertyNested classes/interfaces inherited from interface org.refcodes.io.TimeoutInputStreamAccessor
org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<B extends org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamBuilder<?>>, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamMutator, org.refcodes.io.TimeoutInputStreamAccessor.TimeoutInputStreamProperty -
Method Summary
Modifier and TypeMethodDescriptiondefault <SEGMENT extends Segment>
voidreceiveSegment(SEGMENT aSegment) Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence).default <SEGMENT extends Segment>
voidtransmitSegment(SEGMENT aSegment) Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.Methods inherited from interface org.refcodes.io.Availability
hasAvailableMethods inherited from interface org.refcodes.io.BytesDestination
receiveBytesMethods inherited from interface org.refcodes.io.BytesReceiver
getInputStream, getInputStream, receiveAllBytes, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skipMethods inherited from interface org.refcodes.io.BytesSource
transmitByteMethods inherited from interface org.refcodes.io.BytesTransmitter
getOutputStreamMethods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUncheckedMethods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosableMethods inherited from interface org.refcodes.component.ClosedAccessor
isClosedMethods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpenedMethods inherited from interface org.refcodes.component.Flushable
flushUnchecked, isFlushableMethods inherited from interface org.refcodes.component.Openable
openUncheckedMethods inherited from interface org.refcodes.component.Openable.OpenAutomaton
isOpenableMethods inherited from interface org.refcodes.serial.SegmentReceiver
onReceiveSegment, onReceiveSegmentMethods inherited from interface org.refcodes.serial.SegmentTransmitter
doTransmitSegment, doTransmitSegment, flushMethods inherited from interface org.refcodes.serial.SerialReceiver
available, close, open, receiveByte, receiveBytes, receiveSegmentWithin, receiveSequence, receiveSequenceWithinMethods inherited from interface org.refcodes.serial.SerialTransmitter
flush, transmitBytes, transmitBytes, transmitSequence, transmitSequenceMethods inherited from interface org.refcodes.io.Skippable
available, skipAvailable, skipAvailableExcept, skipAvailableTill, skipAvailableTillSilenceFor, skipAvailableTillSilenceFor, skipAvailableWithin, skipAvailableWithin, skipAvailableWithin
-
Method Details
-
receiveSegment
Receives aSegment(and blocks this thread) till all it'sSequencedata has been received and updates theSegmentby invokingSegment.fromTransmission(Sequence). This method blocks till all bytes are read.- Specified by:
receiveSegmentin interfaceSegmentDestination- Specified by:
receiveSegmentin interfaceSerialReceiver- Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass of implementingSegmenttypes.- Parameters:
aSegment- TheSegmentto be (re-)initialized with the received data.- Throws:
TransmissionException- Thrown in case the received data cannot be used to (re-)initialize the givenSegment.IOException- thrown in case of I/O issues (e.g. a timeout) while receiving.
-
transmitSegment
Transmits aSegment(and blocks this thread) till all it'sSequencedata (as ofTransmission.toSequence()) has been sent.- Specified by:
transmitSegmentin interfaceSegmentSource- Specified by:
transmitSegmentin interfaceSerialTransmitter- Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass used.- Parameters:
aSegment- TheSegment's data to be sent.- Throws:
IOException- thrown in case of I/O issues (e.g. a timeout) while sending.
-