Interface SegmentTransmitter

    • 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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      <SEGMENT extends Segment>
      SegmentResult<SEGMENT>
      doTransmitSegment​(SEGMENT aSegment)
      Asynchronously sends a Segment's Sequence data (does not block this thread).
      <SEGMENT extends Segment>
      void
      doTransmitSegment​(SEGMENT aSegment, SegmentConsumer<SEGMENT> aSegmentConsumer)
      Asynchronously sends a Segment's Sequence data (does not block this thread).
      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
    • Method Detail

      • doTransmitSegment

        <SEGMENT extends Segment> void doTransmitSegment​(SEGMENT aSegment,
                                                         SegmentConsumer<SEGMENT> aSegmentConsumer)
                                                  throws IOException
        Asynchronously sends a Segment's Sequence data (does not block this thread).
        Type Parameters:
        SEGMENT - The Segment type describing the Segment subclass used.
        Parameters:
        aSegment - The Segment to be sent.
        aSegmentConsumer - The callback asynchronously invoked upon having sent the Segment.
        Throws:
        IOException - thrown in case of I/O issues (e.g. a closed connection upon the time of invocation).
      • doTransmitSegment

        <SEGMENT extends SegmentSegmentResult<SEGMENT> doTransmitSegment​(SEGMENT aSegment)
                                                                    throws IOException
        Asynchronously sends a Segment's Sequence data (does not block this thread).
        Type Parameters:
        SEGMENT - The Segment type describing the Segment subclass used.
        Parameters:
        aSegment - The Segment to be sent.
        Returns:
        The SegmentResult which provides the result of the operation (asynchronously), e.g. the Segment being sent or an IOException 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 interface Flushable
        Specified by:
        flush in interface org.refcodes.component.Flushable
        Throws:
        IOException