- All Superinterfaces:
org.refcodes.io.ByteSource
,org.refcodes.io.BytesSource
,org.refcodes.io.BytesTransmitter
,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.component.LinkComponent
,org.refcodes.component.LinkComponent.LinkAutomaton
,org.refcodes.component.Openable
,org.refcodes.component.Openable.OpenAutomaton
,org.refcodes.component.OpenedAccessor
,org.refcodes.mixin.OutputStreamAccessor
,SegmentSource
,SegmentTransmitter
,org.refcodes.io.Transmittable
- All Known Subinterfaces:
Port<PM>
,SerialTransceiver
- All Known Implementing Classes:
AbstractPort
,AbstractPortDecorator
,CrossoverLoopbackPort
,LoopbackPort
public interface SerialTransmitter
extends org.refcodes.io.BytesTransmitter, SegmentTransmitter, org.refcodes.component.LinkComponent.LinkAutomaton
A
SerialTransmitter
is used to write data to a serial port or the
like.-
Nested Class Summary
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.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
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
flush()
default void
transmitBytes
(byte[] aBytes) default void
transmitBytes
(byte[] aBytes, int aOffset, int aLength) default <SEGMENT extends Segment>
voidtransmitSegment
(SEGMENT aSegment) Transmits aSegment
(and blocks this thread) till all it'sSequence
data (as ofTransmission.toSequence()
) has been sent.void
transmitSequence
(Sequence aSequence) Transmits aSequence
(and blocks this thread) till all it's data has been sent.default void
transmitSequence
(Sequence aSequence, int aOffset, int aLength) Transmits aSequence
.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
close, 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
open, openUnchecked
Methods inherited from interface org.refcodes.component.Openable.OpenAutomaton
isOpenable
Methods inherited from interface org.refcodes.serial.SegmentTransmitter
doTransmitSegment, doTransmitSegment
-
Method Details
-
transmitBytes
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesSource
- Throws:
IOException
-
transmitBytes
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesSource
- Specified by:
transmitBytes
in interfaceorg.refcodes.io.BytesTransmitter
- Throws:
IOException
-
transmitSequence
Transmits aSequence
.- Parameters:
aSequence
- TheSequence
containing the data to be send.aOffset
- The offset from where to take the chunk data.aLength
- The number of bytes to take, beginning at the provided offset.- Throws:
IOException
- thrown in case of I/O issues (e.g. a timeout) while sending
-
transmitSequence
Transmits aSequence
(and blocks this thread) till all it's data has been sent.- Parameters:
aSequence
- TheSequence
containing the data to be send.- Throws:
IOException
- thrown in case of I/O issues (e.g. a timeout) while sending
-
transmitSegment
Transmits aSegment
(and blocks this thread) till all it'sSequence
data (as ofTransmission.toSequence()
) has been sent.- Specified by:
transmitSegment
in interfaceSegmentSource
- 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.
-
flush
- Specified by:
flush
in interfaceorg.refcodes.io.ByteTransmitter
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Specified by:
flush
in interfaceSegmentTransmitter
- Throws:
IOException
-