Package reactor.netty
Class ByteBufFlux
- All Implemented Interfaces:
Publisher<ByteBuf>,CorePublisher<ByteBuf>,Scannable
- Author:
- Stephane Maldini
-
Nested Class Summary
Nested classes/interfaces inherited from interface reactor.core.Scannable
Scannable.Attr<T extends Object> -
Field Summary
Fields inherited from class reactor.core.publisher.FluxOperator
sourceFields inherited from interface reactor.core.Scannable
OPERATOR_NAME_UNRELATED_WORDS_PATTERN -
Method Summary
Modifier and TypeMethodDescriptionfinal ByteBufMonoAggregate subsequent byte buffers into a single buffer.final Flux<byte[]>Convert to a byte[] inboundFlux.final Flux<ByteBuffer>Convert to aByteBufferinboundFlux.final Flux<InputStream>Convert to anInputStreaminboundFluxasString()static ByteBufFluxfromInbound(Publisher<?> source) Decorate asByteBufFlux.static ByteBufFluxfromInbound(Publisher<?> source, ByteBufAllocator allocator) Decorate asByteBufFlux.static ByteBufFluxOpen aFileChannelfrom a path and streamByteBufchunks with a default maximum size of 500K into the returnedByteBufFlux.static ByteBufFluxOpen aFileChannelfrom a path and streamByteBufchunks with a given maximum size into the returnedByteBufFlux.static ByteBufFluxfromPath(Path path, int maxChunkSize, ByteBufAllocator allocator) Open aFileChannelfrom a path and streamByteBufchunks with a given maximum size into the returnedByteBufFlux, using the providedByteBufAllocator.static ByteBufFluxfromPath(Path path, ByteBufAllocator allocator) Open aFileChannelfrom a path and streamByteBufchunks with a default maximum size of 500K into the returnedByteBufFlux, using the providedByteBufAllocator.static ByteBufFluxfromString(Publisher<? extends String> source) Decorate asByteBufFlux.static ByteBufFluxfromString(Publisher<? extends String> source, Charset charset, ByteBufAllocator allocator) Decorate asByteBufFlux.final ByteBufMonoAllow multiple consumers downstream of the flux while also disabling auto memory release on each buffer published (retaining in order to prevent premature recycling).final ByteBufFluxretain()Disable auto memory release on each buffer published, retaining in order to prevent premature recycling when buffers are accumulated downstream (async).voidsubscribe(CoreSubscriber<? super ByteBuf> s) Methods inherited from class reactor.core.publisher.FluxOperator
scanUnsafeMethods inherited from class reactor.core.publisher.Flux
all, any, as, blockFirst, blockFirst, blockLast, blockLast, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferUntil, bufferUntil, bufferUntilChanged, bufferUntilChanged, bufferUntilChanged, bufferWhen, bufferWhen, bufferWhile, cache, cache, cache, cache, cache, cache, cancelOn, cast, checkpoint, checkpoint, checkpoint, collect, collect, collectList, collectMap, collectMap, collectMap, collectMultimap, collectMultimap, collectMultimap, collectSortedList, collectSortedList, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapIterable, concatMapIterable, concatWith, concatWithValues, contextCapture, contextWrite, contextWrite, count, create, create, defaultIfEmpty, defer, deferContextual, delayElements, delayElements, delaySequence, delaySequence, delaySubscription, delaySubscription, delaySubscription, delayUntil, dematerialize, distinct, distinct, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doFinally, doFirst, doOnCancel, doOnComplete, doOnDiscard, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elapsed, elementAt, elementAt, empty, error, error, error, expand, expand, expandDeep, expandDeep, filter, filterWhen, filterWhen, first, first, firstWithSignal, firstWithSignal, firstWithValue, firstWithValue, flatMap, flatMap, flatMap, flatMap, flatMapDelayError, flatMapIterable, flatMapIterable, flatMapSequential, flatMapSequential, flatMapSequential, flatMapSequentialDelayError, from, fromArray, fromIterable, fromStream, fromStream, generate, generate, generate, getPrefetch, groupBy, groupBy, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, index, index, interval, interval, interval, interval, join, just, just, last, last, limitRate, limitRate, limitRequest, log, log, log, log, log, log, map, mapNotNull, materialize, merge, merge, merge, merge, merge, merge, mergeComparing, mergeComparing, mergeComparing, mergeComparingDelayError, mergeComparingWith, mergeDelayError, mergeOrdered, mergeOrdered, mergeOrdered, mergeOrderedWith, mergePriority, mergePriority, mergePriority, mergePriorityDelayError, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequentialDelayError, mergeSequentialDelayError, mergeSequentialDelayError, mergeWith, metrics, name, never, next, ofType, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorComplete, onErrorComplete, onErrorComplete, onErrorContinue, onErrorContinue, onErrorContinue, onErrorMap, onErrorMap, onErrorMap, onErrorResume, onErrorResume, onErrorResume, onErrorReturn, onErrorReturn, onErrorReturn, onErrorStop, onTerminateDetach, or, parallel, parallel, parallel, publish, publish, publish, publish, publishNext, publishOn, publishOn, publishOn, push, push, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, replay, replay, replay, replay, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleTimeout, sampleTimeout, scan, scan, scanWith, share, shareNext, single, single, singleOrEmpty, skip, skip, skip, skipLast, skipUntil, skipUntilOther, skipWhile, sort, sort, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchOnFirst, switchOnFirst, switchOnNext, switchOnNext, tag, take, take, take, take, takeLast, takeUntil, takeUntilOther, takeWhile, tap, tap, tap, then, then, thenEmpty, thenMany, timed, timed, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timestamp, timestamp, toIterable, toIterable, toIterable, toStream, toStream, toString, transform, transformDeferred, transformDeferredContextual, using, using, using, using, usingWhen, usingWhen, window, window, window, window, window, window, window, windowTimeout, windowTimeout, windowTimeout, windowTimeout, windowUntil, windowUntil, windowUntil, windowUntilChanged, windowUntilChanged, windowUntilChanged, windowWhen, windowWhile, windowWhile, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface reactor.core.Scannable
actuals, inners, isScanAvailable, name, parents, scan, scanOrDefault, stepName, steps, tags, tagsDeduplicated
-
Method Details
-
fromInbound
Decorate asByteBufFlux.- Parameters:
source- publisher to decorate- Returns:
- a
ByteBufFlux
-
fromInbound
Decorate asByteBufFlux.- Parameters:
source- publisher to decorateallocator- the channelByteBufAllocator- Returns:
- a
ByteBufFlux
-
fromString
Decorate asByteBufFlux.- Parameters:
source- publisher to decorate- Returns:
- a
ByteBufFlux
-
fromString
public static ByteBufFlux fromString(Publisher<? extends String> source, Charset charset, ByteBufAllocator allocator) Decorate asByteBufFlux.- Parameters:
source- publisher to decoratecharset- the encoding charsetallocator- theByteBufAllocator- Returns:
- a
ByteBufFlux
-
fromPath
Open aFileChannelfrom a path and streamByteBufchunks with a default maximum size of 500K into the returnedByteBufFlux.- Parameters:
path- the path to the resource to stream- Returns:
- a
ByteBufFlux
-
fromPath
Open aFileChannelfrom a path and streamByteBufchunks with a given maximum size into the returnedByteBufFlux.- Parameters:
path- the path to the resource to streammaxChunkSize- the maximum per-item ByteBuf size- Returns:
- a
ByteBufFlux
-
fromPath
Open aFileChannelfrom a path and streamByteBufchunks with a default maximum size of 500K into the returnedByteBufFlux, using the providedByteBufAllocator.- Parameters:
path- the path to the resource to streamallocator- the channelByteBufAllocator- Returns:
- a
ByteBufFlux
-
fromPath
Open aFileChannelfrom a path and streamByteBufchunks with a given maximum size into the returnedByteBufFlux, using the providedByteBufAllocator.- Parameters:
path- the path to the resource to streammaxChunkSize- the maximum per-item ByteBuf sizeallocator- the channelByteBufAllocator- Returns:
- a
ByteBufFlux
-
asByteBuffer
Convert to aByteBufferinboundFlux.- Returns:
- a
ByteBufferinboundFlux
-
asByteArray
Convert to a byte[] inboundFlux.- Returns:
- a byte[] inbound
Flux
-
asInputStream
Convert to anInputStreaminboundFluxNote: Auto memory release is disabled. The underlying
ByteBufwill be released only whenInputStream.close()is invoked. EnsureInputStream.close()is invoked for any terminal signal:complete|error|cancel- Returns:
- a
InputStreaminboundFlux
-
asString
-
asString
-
aggregate
Aggregate subsequent byte buffers into a single buffer.- Returns:
ByteBufMonoof aggregatedByteBuf
-
multicast
Allow multiple consumers downstream of the flux while also disabling auto memory release on each buffer published (retaining in order to prevent premature recycling).- Returns:
ByteBufMonoof retainedByteBuf
-
retain
Disable auto memory release on each buffer published, retaining in order to prevent premature recycling when buffers are accumulated downstream (async).- Returns:
ByteBufFluxof retainedByteBuf
-
subscribe
-