Top Description Inners Constructors Methods
reactor.netty

public abstract Class FutureMono

extends Mono<Void>
Class Inheritance
Known Direct Subclasses
reactor.netty.FutureMono.ImmediateFutureMono, reactor.netty.FutureMono.DeferredFutureMono
Imports
java.nio.channels.ClosedChannelException, java.util.Objects, java.util.function.Supplier, io.netty.util.concurrent.Future, .GenericFutureListener, org.reactivestreams.Subscriber, .Subscription, reactor.core.CoreSubscriber, reactor.core.publisher.Mono, .Operators, reactor.netty.channel.AbortedException, reactor.util.context.Context

Convert Netty Future into void Mono.
Author
Stephane Maldini

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <
the future type
F extends Future<Void>
>
Mono<Void>

Returns:

A Mono forwarding Future success or failure
deferFuture
(Supplier<F>
the future to evaluate and convert from
deferredFuture
)

Convert a supplied Future for each subscriber into Mono.

pack-priv static <F extends Future<Void>> void
doSubscribe(CoreSubscriber<? super Void> s, F future)

public static <
the future type
F extends Future<Void>
>
Mono<Void>

Returns:

A Mono forwarding Future success or failure
from
(F
the future to convert from
future
)

Convert a Future into Mono.

Inherited from reactor.core.publisher.Mono:
andasblockblockblockOptionalblockOptionalcachecachecachecachecachecacheInvalidateIfcacheInvalidateWhencacheInvalidateWhencancelOncastcheckpointcheckpointcheckpointconcatWithcontextCapturecontextWritecontextWritecreatedefaultIfEmptydeferdeferContextualdelaydelaydelayElementdelayElementdelaySubscriptiondelaySubscriptiondelaySubscriptiondelayUntildematerializedoAfterTerminatedoFinallydoFirstdoOnCanceldoOnDiscarddoOnEachdoOnErrordoOnErrordoOnErrordoOnNextdoOnRequestdoOnSubscribedoOnSuccessdoOnTerminateelapsedelapsedemptyerrorerrorexpandexpandexpandDeepexpandDeepfilterfilterWhenfirstfirstfirstWithSignalfirstWithSignalfirstWithValuefirstWithValueflatMapflatMapIterableflatMapManyflatMapManyfluxfromfromCallablefromCompletionStagefromCompletionStagefromDirectfromFuturefromFuturefromFuturefromFuturefromRunnablefromSupplierhandlehasElementhideignoreElementignoreElementsjustjustOrEmptyjustOrEmptyloglogloglogloglogmapmapNotNullmaterializemergeWithmetricsnameneverofTypeonAssemblyonErrorCompleteonErrorCompleteonErrorCompleteonErrorContinueonErrorContinueonErrorContinueonErrorMaponErrorMaponErrorMaponErrorResumeonErrorResumeonErrorResumeonErrorReturnonErrorReturnonErrorReturnonErrorStoponTerminateDetachorpublishpublishOnrepeatrepeatrepeatrepeatrepeatWhenrepeatWhenEmptyrepeatWhenEmptyretryretryretryWhensequenceEqualsequenceEqualsequenceEqualsharesinglesingleOptionalsubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeWithswitchIfEmptytagtaketaketakeUntilOthertaptaptapthenthenthenEmptythenManythenReturntimedtimedtimeouttimeouttimeouttimeouttimeouttimeouttimestamptimestamptoFuturetoStringtransformtransformDeferredtransformDeferredContextualusingusingusingWhenusingWhenwhenwhenwhenDelayErrorwhenDelayErrorzipzipzipzipzipzipzipzipzipzipzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipWhenzipWhenzipWithzipWith

Constructor Detail

FutureMonoback to summary
public FutureMono()

Method Detail

deferFutureback to summary
public static <F extends Future<Void>> Mono<Void> deferFuture(Supplier<F> deferredFuture)

Convert a supplied Future for each subscriber into Mono. Mono#subscribe(Subscriber) will bridge to Future#addListener(GenericFutureListener).

Parameters
<F>
the future type
deferredFuture:Supplier<F>

the future to evaluate and convert from

Returns:Mono<Void>

A Mono forwarding Future success or failure

doSubscribeback to summary
pack-priv static <F extends Future<Void>> void doSubscribe(CoreSubscriber<? super Void> s, F future)
Annotations
@SuppressWarnings:FutureReturnValueIgnored
fromback to summary
public static <F extends Future<Void>> Mono<Void> from(F future)

Convert a Future into Mono. Mono#subscribe(Subscriber) will bridge to Future#addListener(GenericFutureListener).

Parameters
<F>
the future type
future:F

the future to convert from

Returns:Mono<Void>

A Mono forwarding Future success or failure

reactor.netty back to summary

pack-priv final Class FutureMono.DeferredFutureMono<F extends io.netty.util.concurrent.Future<java.lang.Void>>

extends FutureMono
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final Supplier<F>

Constructor Summary

AccessConstructor and Description
pack-priv
DeferredFutureMono(Supplier<F> deferredFuture)

Method Summary

Modifier and TypeMethod and Description
public void
subscribe(CoreSubscriber<? super Void>
the Subscriber interested into the published sequence
s
)

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

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
Inherited from reactor.netty.FutureMono:
deferFuturedoSubscribefrom

Field Detail

deferredFutureback to summary
pack-priv final Supplier<F> deferredFuture

Constructor Detail

DeferredFutureMonoback to summary
pack-priv DeferredFutureMono(Supplier<F> deferredFuture)

Method Detail

subscribeback to summary
public void subscribe(CoreSubscriber<? super Void> s)

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
s:CoreSubscriber<? super Void>

the Subscriber interested into the published sequence

Annotations
@Override
reactor.netty back to summary

pack-priv final Class FutureMono.FutureSubscription<F extends io.netty.util.concurrent.Future<java.lang.Void>>

extends Object
implements GenericFutureListener<F extends Future<Void>>, Subscription, Supplier<Context>
Class Inheritance
All Implemented Interfaces
java.util.function.Supplier, org.reactivestreams.Subscription, io.netty.util.concurrent.GenericFutureListener, java.util.EventListener

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv final F
pack-priv final CoreSubscriber<? super Void>
s

Constructor Summary

AccessConstructor and Description
pack-priv
FutureSubscription(F future, CoreSubscriber<? super Void> s)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public Context
get()

Implements java.util.function.Supplier.get.

Gets a result.
public void
operationComplete(F
the source Future which called this callback
future
)

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.
public void
request(long
the strictly positive number of elements to requests to the upstream Publisher
n
)

Implements org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.
private static Throwable
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancelledback to summary
pack-priv boolean cancelled
futureback to summary
pack-priv final F future
sback to summary
pack-priv final CoreSubscriber<? super Void> s

Constructor Detail

FutureSubscriptionback to summary
pack-priv FutureSubscription(F future, CoreSubscriber<? super Void> s)

Method Detail

cancelback to summary
public void cancel()

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
@SuppressWarnings:FutureReturnValueIgnored
getback to summary
public Context get()

Implements java.util.function.Supplier.get.

Doc from java.util.function.Supplier.get.

Gets a result.

Returns:Context

a result

Annotations
@Override
operationCompleteback to summary
public void operationComplete(F future)

Implements io.netty.util.concurrent.GenericFutureListener.operationComplete.

Doc from io.netty.util.concurrent.GenericFutureListener.operationComplete.

Invoked when the operation associated with the Future has been completed.

Parameters
future:F

the source Future which called this callback

Annotations
@Override
requestback to summary
public void request(long n)

Implements org.reactivestreams.Subscription.request.

Doc from org.reactivestreams.Subscription.request.

No events will be sent by a Publisher until demand is signaled via this method.

It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more, it may be treated by the Publisher as "effectively unbounded".

Whatever has been requested can be sent by the Publisher so only signal demand for what can be safely handled.

A Publisher can send less than is requested if the stream ends but then must emit either Subscriber#onError(Throwable) or Subscriber#onComplete().

Parameters
n:long

the strictly positive number of elements to requests to the upstream Publisher

Annotations
@Override
wrapErrorback to summary
private static Throwable wrapError(Throwable error)
reactor.netty back to summary

pack-priv final Class FutureMono.ImmediateFutureMono<F extends io.netty.util.concurrent.Future<java.lang.Void>>

extends FutureMono
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final F

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
subscribe(final CoreSubscriber<? super Void>
the Subscriber interested into the published sequence
s
)

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

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
Inherited from reactor.netty.FutureMono:
deferFuturedoSubscribefrom

Field Detail

futureback to summary
pack-priv final F future

Constructor Detail

ImmediateFutureMonoback to summary
pack-priv ImmediateFutureMono(F future)

Method Detail

subscribeback to summary
public void subscribe(final CoreSubscriber<? super Void> s)

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
s:CoreSubscriber<? super Void>

the Subscriber interested into the published sequence

Annotations
@Override