- All Superinterfaces:
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.OpenedAccessor
,SegmentSource
,org.refcodes.io.Transmittable
- All Known Subinterfaces:
Port<PM>
,SegmentTransceiver
,SerialTransceiver
,SerialTransmitter
- All Known Implementing Classes:
AbstractPort
,AbstractPortDecorator
,CrossoverLoopbackPort
,LoopbackPort
The
SegmentTransmitter
is used to transmit Segment
instances
in a unified way.-
Nested Class Summary
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.OpenedAccessor
org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
-
Method Summary
Modifier and TypeMethodDescription<SEGMENT extends Segment>
SegmentResult<SEGMENT>doTransmitSegment
(SEGMENT aSegment) <SEGMENT extends Segment>
voiddoTransmitSegment
(SEGMENT aSegment, SegmentConsumer<SEGMENT> aSegmentConsumer) default void
flush()
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.serial.SegmentSource
transmitSegment
-
Method Details
-
doTransmitSegment
<SEGMENT extends Segment> void doTransmitSegment(SEGMENT aSegment, SegmentConsumer<SEGMENT> aSegmentConsumer) throws IOException - Type Parameters:
SEGMENT
- TheSegment
type describing theSegment
subclass used.- Parameters:
aSegment
- TheSegment
to be sent.aSegmentConsumer
- The callback asynchronously invoked upon having sent theSegment
.- Throws:
IOException
- thrown in case of I/O issues (e.g. a closed connection upon the time of invocation).
-
doTransmitSegment
<SEGMENT extends Segment> SegmentResult<SEGMENT> doTransmitSegment(SEGMENT aSegment) throws IOException - Type Parameters:
SEGMENT
- TheSegment
type describing theSegment
subclass used.- Parameters:
aSegment
- TheSegment
to be sent.- Returns:
- The
SegmentResult
which provides the result of the operation (asynchronously), e.g. theSegment
being sent or anIOException
having occurred. - Throws:
IOException
- thrown in case of I/O issues (e.g. a closed connection upon the time of invocation).
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Throws:
IOException
-