- 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.ReceiverInputStream
Nested classes/interfaces inherited from interface org.refcodes.io.BytesTransmitter
org.refcodes.io.BytesTransmitter.TransmitterOutputStream
Nested 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.ClosedProperty
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectableComponent
org.refcodes.component.ConnectableComponent.ConnectableAutomaton
Nested classes/interfaces inherited from interface org.refcodes.component.ConnectionStatusAccessor
org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusMutator, org.refcodes.component.ConnectionStatusAccessor.ConnectionStatusProperty
Nested 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.InputStreamProperty
Nested 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.OpenedProperty
Nested 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.OutputStreamProperty
Nested 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'sSequence
data has been received and updates theSegment
by invokingSegment.fromTransmission(Sequence)
.default <SEGMENT extends Segment>
voidtransmitSegment
(SEGMENT aSegment) Transmits aSegment
(and blocks this thread) till all it'sSequence
data (as ofTransmission.toSequence()
) has been sent.Methods inherited from interface org.refcodes.io.Availability
hasAvailable
Methods inherited from interface org.refcodes.io.BytesDestination
receiveBytes
Methods inherited from interface org.refcodes.io.BytesReceiver
getInputStream, getInputStream, receiveAllBytes, receiveBytesWithin, receiveBytesWithin, receiveByteWithin, skip
Methods inherited from interface org.refcodes.io.BytesSource
transmitByte
Methods inherited from interface org.refcodes.io.BytesTransmitter
getOutputStream
Methods inherited from interface org.refcodes.component.Closable
closeIn, closeQuietly, closeUnchecked
Methods inherited from interface org.refcodes.component.Closable.CloseAutomaton
isClosable
Methods inherited from interface org.refcodes.component.ClosedAccessor
isClosed
Methods inherited from interface org.refcodes.component.ConnectionStatusAccessor
getConnectionStatus, isOpened
Methods inherited from interface org.refcodes.component.Flushable
flushUnchecked, isFlushable
Methods inherited from interface org.refcodes.component.Openable
openUnchecked
Methods inherited from interface org.refcodes.component.Openable.OpenAutomaton
isOpenable
Methods inherited from interface org.refcodes.serial.SegmentReceiver
onReceiveSegment, onReceiveSegment
Methods inherited from interface org.refcodes.serial.SegmentTransmitter
doTransmitSegment, doTransmitSegment, flush
Methods inherited from interface org.refcodes.serial.SerialReceiver
available, close, open, receiveByte, receiveBytes, receiveSegmentWithin, receiveSequence, receiveSequenceWithin
Methods inherited from interface org.refcodes.serial.SerialTransmitter
flush, transmitAllBytes, transmitBytes, transmitSequence, transmitSequence
Methods inherited from interface org.refcodes.io.Skippable
available, skipAvailable, skipAvailableExcept, skipAvailableTill, skipAvailableTillSilenceFor, skipAvailableTillSilenceFor, skipAvailableWithin, skipAvailableWithin, skipAvailableWithin
-
Method Details
-
receiveSegment
default <SEGMENT extends Segment> void receiveSegment(SEGMENT aSegment) throws TransmissionException, IOException Receives aSegment
(and blocks this thread) till all it'sSequence
data has been received and updates theSegment
by invokingSegment.fromTransmission(Sequence)
. This method blocks till all bytes are read.- Specified by:
receiveSegment
in interfaceSegmentDestination
- Specified by:
receiveSegment
in interfaceSerialReceiver
- Type Parameters:
SEGMENT
- TheSegment
type describing theSegment
subclass of implementingSegment
types.- Parameters:
aSegment
- TheSegment
to 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'sSequence
data (as ofTransmission.toSequence()
) has been sent.- Specified by:
transmitSegment
in interfaceSegmentSource
- Specified by:
transmitSegment
in interfaceSerialTransmitter
- Type Parameters:
SEGMENT
- TheSegment
type describing theSegment
subclass used.- Parameters:
aSegment
- TheSegment
's data to be sent.- Throws:
IOException
- thrown in case of I/O issues (e.g. a timeout) while sending.
-