- 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.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.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 voidflush()Methods inherited from interface org.refcodes.component.Closable
close, 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.serial.SegmentSource
transmitSegment
-
Method Details
-
doTransmitSegment
<SEGMENT extends Segment> void doTransmitSegment(SEGMENT aSegment, SegmentConsumer<SEGMENT> aSegmentConsumer) throws IOException - Type Parameters:
SEGMENT- TheSegmenttype describing theSegmentsubclass used.- Parameters:
aSegment- TheSegmentto 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- TheSegmenttype describing theSegmentsubclass used.- Parameters:
aSegment- TheSegmentto be sent.- Returns:
- The
SegmentResultwhich provides the result of the operation (asynchronously), e.g. theSegmentbeing sent or anIOExceptionhaving occurred. - Throws:
IOException- thrown in case of I/O issues (e.g. a closed connection upon the time of invocation).
-
flush
- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceorg.refcodes.component.Flushable- Throws:
IOException
-