Class ByteInputContext

  • public final class ByteInputContext
    extends ByteTransferContext
    Container for multiple input streams. Represents a transfer context on receiver-side.

    Thread safety:

    Methods with default access modifier, namely onNewStream(), onByteBuf(ByteBuf), onContextClose(), are not thread-safe, since they are called by a single Netty event loop.

    Public methods are thread safe, although the execution order may not be linearized if they were called from different threads.

    • Method Detail

      • getInputStreams

        public java.util.Iterator<> getInputStreams()
        Returns Iterator of InputStreams. This method always returns the same Iterator instance.
        Iterator of InputStreams.
      • getCompletedFuture

        public java.util.concurrent.CompletableFuture<java.util.Iterator<>> getCompletedFuture()
        Returns a future, which is completed when the corresponding transfer for this context gets done.
        a CompletableFuture for the same value that getInputStreams() returns
      • onChannelError

        public void onChannelError​(@Nullable
                                   java.lang.Throwable cause)
        Description copied from class: ByteTransferContext
        Handles exception.
        Specified by:
        onChannelError in class ByteTransferContext
        cause - the cause of exception handling