Top Description Fields Constructors Methods
reactor.core.publisher

pack-priv final Class MonoEmpty

extends Mono<Object>
implements Fuseable.ScalarCallable<Object>, SourceProducer<Object>
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.SourceProducer, org.reactivestreams.Publisher, reactor.core.Scannable, reactor.core.Fuseable.ScalarCallable, java.util.concurrent.Callable
Imports
java.time.Duration, org.reactivestreams.Publisher, reactor.core.CoreSubscriber, .Fuseable, reactor.util.annotation.Nullable

Represents an empty publisher which only calls onSubscribe and onComplete.

This Publisher is effectively stateless and only a single instance exists. Use the instance() method to obtain a properly type-parametrized view of it.

See Also
Reactive-Streams-Commons

Field Summary

Modifier and TypeField and Description
pack-priv static final Publisher<Object>
Inherited from reactor.core.publisher.Mono:
EQUALS_BIPREDICATE

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Object
block(Duration
maximum time period to wait for before raising a RuntimeException
m
)

Overrides reactor.core.publisher.Mono.block.

Subscribe to this Mono and block until a next signal is received or a timeout expires.
public Object
block()

Overrides reactor.core.publisher.Mono.block.

Subscribe to this Mono and block indefinitely until a next signal is received.
public Object
call()

Implements java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.
pack-priv static <
the output type
T
>
Mono<T>

Returns:

a properly parametrized instance of this empty Publisher
instance
()

Returns a properly parametrized instance of this empty Publisher.

public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides default reactor.core.publisher.SourceProducer.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(CoreSubscriber<? super Object>
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.
Inherited from reactor.core.publisher.Mono:
andasblockOptionalblockOptionalcachecachecachecachecachecacheInvalidateIfcacheInvalidateWhencacheInvalidateWhencancelOncastcheckpointcheckpointcheckpointconcatWithcontextCapturecontextWritecontextWritecreatedefaultIfEmptydeferdeferContextualdelaydelaydelayElementdelayElementdelaySubscriptiondelaySubscriptiondelaySubscriptiondelayUntildematerializedoAfterTerminatedoFinallydoFirstdoOnCanceldoOnDiscarddoOnEachdoOnErrordoOnErrordoOnErrordoOnNextdoOnRequestdoOnSignaldoOnSubscribedoOnSuccessdoOnTerminalSignaldoOnTerminateelapsedelapsedemptyemptyequalsBiPredicateerrorerrorexpandexpandexpandDeepexpandDeepfilterfilterWhenfirstfirstfirstWithSignalfirstWithSignalfirstWithValuefirstWithValueflatMapflatMapIterableflatMapManyflatMapManyfluxfromfromCallablefromCompletionStagefromCompletionStagefromDirectfromFuturefromFuturefromFuturefromFuturefromRunnablefromSupplierhandlehasElementhideignoreElementignoreElementsjustjustOrEmptyjustOrEmptyloglogloglogloglogmapmapNotNullmaterializemergeWithmetricsnameneverofTypeonAssemblyonErrorCompleteonErrorCompleteonErrorCompleteonErrorContinueonErrorContinueonErrorContinueonErrorMaponErrorMaponErrorMaponErrorResumeonErrorResumeonErrorResumeonErrorReturnonErrorReturnonErrorReturnonErrorStoponTerminateDetachorpublishpublishOnrepeatrepeatrepeatrepeatrepeatWhenrepeatWhenEmptyrepeatWhenEmptyretryretryretryWhensequenceEqualsequenceEqualsequenceEqualsharesinglesingleOptionalsubscribesubscribesubscribesubscribesubscribesubscribesubscribesubscribeOnsubscribeWithswitchIfEmptytagtaketaketakeUntilOthertaptaptapthenthenthenEmptythenManythenReturntimedtimedtimeouttimeouttimeouttimeouttimeouttimeouttimestamptimestamptoFuturetoStringtransformtransformDeferredtransformDeferredContextualusingusingusingWhenusingWhenwhenwhenwhenDelayErrorwhenDelayErrorwrapzipzipzipzipzipzipzipzipzipzipzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipDelayErrorzipWhenzipWhenzipWithzipWith

Field Detail

INSTANCEback to summary
pack-priv static final Publisher<Object> INSTANCE

Constructor Detail

MonoEmptyback to summary
pack-priv MonoEmpty()

Method Detail

blockback to summary
public Object block(Duration m)

Overrides reactor.core.publisher.Mono.block.

Doc from reactor.core.publisher.Mono.block.

Subscribe to this Mono and block until a next signal is received or a timeout expires. Returns that value, or null if the Mono completes empty. In case the Mono errors, the original exception is thrown (wrapped in a RuntimeException if it was a checked exception). If the provided timeout expires, a RuntimeException is thrown.

Note that each block() will trigger a new subscription: in other words, the result might miss signal from hot publishers.

Parameters
m:Duration

maximum time period to wait for before raising a RuntimeException

Returns:Object

T the result

Annotations
@Override
@Nullable
blockback to summary
public Object block()

Overrides reactor.core.publisher.Mono.block.

Doc from reactor.core.publisher.Mono.block.

Subscribe to this Mono and block indefinitely until a next signal is received. Returns that value, or null if the Mono completes empty. In case the Mono errors, the original exception is thrown (wrapped in a RuntimeException if it was a checked exception).

Note that each block() will trigger a new subscription: in other words, the result might miss signal from hot publishers.

Returns:Object

T the result

Annotations
@Override
@Nullable
callback to summary
public Object call() throws Exception

Implements java.util.concurrent.Callable.call.

Doc from java.util.concurrent.Callable.call.

Computes a result, or throws an exception if unable to do so.

Returns:Object

computed result

Annotations
@Override
@Nullable
Exceptions
Exception:
if unable to compute a result
instanceback to summary
pack-priv static <T> Mono<T> instance()

Returns a properly parametrized instance of this empty Publisher.

Parameters
<T>
the output type
Returns:Mono<T>

a properly parametrized instance of this empty Publisher

Annotations
@SuppressWarnings:unchecked
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides default reactor.core.publisher.SourceProducer.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override
subscribeback to summary
public void subscribe(CoreSubscriber<? super Object> 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 Object>

the Subscriber interested into the published sequence

Annotations
@Override