-
- 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
public interface SegmentTransmitter extends SegmentSource, org.refcodes.io.Transmittable
TheSegmentTransmitter
is used to transmitSegment
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <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.ConnectionStatusAccessor
getConnectionStatus, isOpened
-
Methods inherited from interface org.refcodes.serial.SegmentSource
transmitSegment
-
-
-
-
Method Detail
-
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
default void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceorg.refcodes.component.Flushable
- Throws:
IOException
-
-