Top Description Inners Fields Constructors Methods
reactor.netty5

public Class BufferMono

extends MonoOperator<Buffer, Buffer>
Class Inheritance
Known Direct Subclasses
reactor.netty5.BufferMono.BufferMonoFuseable
Imports
io.netty5.buffer.BufferInputStream, .Buffer, .BufferAllocator, io.netty5.util.Send, org.reactivestreams.Publisher, reactor.core.CoreSubscriber, .Fuseable, reactor.core.publisher.Mono, .MonoOperator, java.io.InputStream, java.nio.ByteBuffer, java.nio.charset.Charset, java.util.ArrayList, .List, .Objects

A decorating Mono NettyInbound with various Buffer related operations.
Author
Violeta Georgieva
Since
2.0.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Inherited from reactor.core.publisher.MonoOperator:
source

Constructor Summary

AccessConstructor and Description
pack-priv
BufferMono(Mono<?> source)

Method Summary

Modifier and TypeMethod and Description
public final Mono<byte[]>

Returns:

a byte[] inbound Mono
asByteArray
()

a byte[] inbound Mono

public final Mono<ByteBuffer>

Returns:

a ByteBuffer inbound Mono
asByteBuffer
()

a ByteBuffer inbound Mono

public final Mono<InputStream>

Returns:

a InputStream inbound Mono
asInputStream
()

Convert to an InputStream inbound Mono

Note

The underlying Buffer will be released only when InputStream#close() is invoked.

public final Mono<String>

Returns:

a String inbound Mono
asString
()

a String inbound Mono

public final Mono<String>

Returns:

a String inbound Mono
asString
(Charset
the decoding charset
charset
)

a String inbound Mono

public static BufferMono

Returns:

a BufferMono
fromString
(Publisher<? extends String>
publisher to decorate
source
)

Decorate as BufferMono

public static BufferMono

Returns:

a BufferMono
fromString
(Publisher<? extends String>
publisher to decorate
source
,
Charset
the encoding charset
charset
,
BufferAllocator allocator)

Decorate as BufferMono

pack-priv static BufferMono
maybeFuse(Mono<?> source)

public void
subscribe(CoreSubscriber<? super Buffer>
the Subscriber interested into the published sequence
actual
)

Implements abstract reactor.core.publisher.Mono.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
public final Mono<Buffer>

Returns:

Mono of split Buffers
transferOwnership
()

Returns Mono of split Buffers.

Inherited from reactor.core.publisher.MonoOperator:
scanUnsafe

Constructor Detail

BufferMonoback to summary
pack-priv BufferMono(Mono<?> source)

Method Detail

asByteArrayback to summary
public final Mono<byte[]> asByteArray()

a byte[] inbound Mono

Returns:Mono<byte[]>

a byte[] inbound Mono

asByteBufferback to summary
public final Mono<ByteBuffer> asByteBuffer()

a ByteBuffer inbound Mono

Returns:Mono<ByteBuffer>

a ByteBuffer inbound Mono

asInputStreamback to summary
public final Mono<InputStream> asInputStream()

Convert to an InputStream inbound Mono

Note

The underlying Buffer will be released only when InputStream#close() is invoked. Ensure InputStream#close() is invoked for any terminal signal: complete | error | cancel.

Returns:Mono<InputStream>

a InputStream inbound Mono

asStringback to summary
public final Mono<String> asString()

a String inbound Mono

Returns:Mono<String>

a String inbound Mono

asStringback to summary
public final Mono<String> asString(Charset charset)

a String inbound Mono

Parameters
charset:Charset

the decoding charset

Returns:Mono<String>

a String inbound Mono

fromStringback to summary
public static BufferMono fromString(Publisher<? extends String> source)

Decorate as BufferMono

Parameters
source:Publisher<? extends String>

publisher to decorate

Returns:BufferMono

a BufferMono

fromStringback to summary
public static BufferMono fromString(Publisher<? extends String> source, Charset charset, BufferAllocator allocator)

Decorate as BufferMono

Parameters
source:Publisher<? extends String>

publisher to decorate

charset:Charset

the encoding charset

allocator:BufferAllocator

the BufferAllocator

Returns:BufferMono

a BufferMono

maybeFuseback to summary
pack-priv static BufferMono maybeFuse(Mono<?> source)
subscribeback to summary
public void subscribe(CoreSubscriber<? super Buffer> actual)

Implements abstract reactor.core.publisher.Mono.subscribe.

Implements reactor.core.CorePublisher.subscribe.

Doc from reactor.core.publisher.Mono.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.

In addition to behave as expected by Publisher#subscribe(Subscriber) in a controlled manner, it supports direct subscribe-time Context passing.

Parameters
actual:CoreSubscriber<? super Buffer>

the Subscriber interested into the published sequence

Annotations
@Override
transferOwnershipback to summary
public final Mono<Buffer> transferOwnership()

Returns Mono of split Buffers. This transfers the ownership to the recipient. The caller of this method should ensure the Buffers are closed.

Returns:Mono<Buffer>

Mono of split Buffers

reactor.netty5 back to summary

pack-priv final Class BufferMono.BufferMonoFuseable

extends BufferMono
implements Fuseable
Class Inheritance
All Implemented Interfaces
reactor.core.Fuseable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from reactor.netty5.BufferMono:
asByteArrayasByteBufferasInputStreamasStringasStringfromStringfromStringmaybeFusesubscribetransferOwnership

Constructor Detail

BufferMonoFuseableback to summary
pack-priv BufferMonoFuseable(Mono<?> source)