Class ReadableByteChannelPublisher

  • All Implemented Interfaces:
    Flow.Publisher<DataChunk>

    public class ReadableByteChannelPublisher
    extends Object
    implements Flow.Publisher<DataChunk>
    Publish a channel content to a single subscriber. If channel doesn't offer data, then it is requested again after some period defined be retry schema.

    Only first subscriber is accepted.

    • Constructor Detail

      • ReadableByteChannelPublisher

        public ReadableByteChannelPublisher​(ReadableByteChannel channel,
                                            RetrySchema retrySchema)
        Creates new instance.
        Parameters:
        channel - a channel to read and publish
        retrySchema - a retry schema functional interface used in case, that channel read retrieved zero bytes.