Interface SegmentReceiver

    • 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.OpenedAccessor

        org.refcodes.component.OpenedAccessor.OpenedMutator, org.refcodes.component.OpenedAccessor.OpenedProperty
    • Method Detail

      • receiveSegmentWithin

        <SEGMENT extends Segment> void receiveSegmentWithin​(long aTimeoutInMs,
                                                            SEGMENT aSegment)
                                                     throws TransmissionException,
                                                            IOException
        Receives a Segment (and blocks this thread) till all it's Sequence data has been received and updates the Segment by invoking Segment.fromTransmission(Sequence). This method blocks till all bytes are read or the timeout has been reached.
        Type Parameters:
        SEGMENT - The Segment type describing the Segment subclass of implementing Segment types.
        Parameters:
        aTimeoutInMs - The default timeout for read operations not explicitly called with a timeout argument. With a value of -1 timeout handling is disabled (blocking mode) or a technical timeout occurs (implementation depended).
        aSegment - The Segment to be (re-)initialized with the received data.
        Throws:
        TransmissionException - Thrown in case the received data cannot be used to (re-)initialize the given Segment.
        IOException - thrown in case of I/O issues (e.g. a timeout) while receiving.