Top Methods
reactor.core.publisher

pack-priv Interface InternalEmptySink<T>

extends Sinks.Empty<T>, ContextHolder
Known Direct Subinterfaces
reactor.core.publisher.InternalOneSink
Known Direct Implementers
reactor.core.publisher.SinkEmptyMulticast, reactor.core.publisher.SinkEmptySerialized
Imports
reactor.core.publisher.Sinks.EmissionException

Method Summary

Modifier and TypeMethod and Description
public default void
emitEmpty(Sinks.EmitFailureHandler
the failure handler that allows retrying failed EmitResult.
failureHandler
)

Implements reactor.core.publisher.Sinks.Empty.emitEmpty.

A simplified attempt at completing via the tryEmitEmpty() API, generating an onComplete signal.
public default void
emitError(Throwable
the exception to signal, not null
error
,
Sinks.EmitFailureHandler
the failure handler that allows retrying failed EmitResult.
failureHandler
)

Implements reactor.core.publisher.Sinks.Empty.emitError.

A simplified attempt at failing the sequence via the tryEmitError(Throwable) API, generating an onError signal.
Inherited from reactor.core.publisher.ContextHolder:
currentContext
Inherited from reactor.core.publisher.Sinks.Empty:
asMonocurrentSubscriberCounttryEmitEmptytryEmitError

Method Detail

emitEmptyback to summary
public default void emitEmpty(Sinks.EmitFailureHandler failureHandler)

Implements reactor.core.publisher.Sinks.Empty.emitEmpty.

Doc from reactor.core.publisher.Sinks.Empty.emitEmpty.

A simplified attempt at completing via the tryEmitEmpty() API, generating an onComplete signal. If the result of the attempt is not a success, implementations SHOULD retry the tryEmitEmpty() call IF the provided EmitFailureHandler returns true. Otherwise, failures are dealt with in a predefined way that might depend on the actual sink implementation (see below for the vanilla reactor-core behavior).

Generally, tryEmitEmpty() is preferable since it allows a custom handling of error cases, although this implies checking the returned EmitResult and correctly acting on it. This API is intended as a good default for convenience.

When the EmitResult is not a success, vanilla reactor-core operators have the following behavior:

Might throw an unchecked exception as a last resort (eg. in case of a fatal error downstream which cannot be propagated to any asynchronous handler, a bubbling exception, a EmitResult#FAIL_NON_SERIALIZED as described above, ...).

Parameters
failureHandler:Sinks.EmitFailureHandler

the failure handler that allows retrying failed EmitResult.

Annotations
@Override
emitErrorback to summary
public default void emitError(Throwable error, Sinks.EmitFailureHandler failureHandler)

Implements reactor.core.publisher.Sinks.Empty.emitError.

Doc from reactor.core.publisher.Sinks.Empty.emitError.

A simplified attempt at failing the sequence via the tryEmitError(Throwable) API, generating an onError signal. If the result of the attempt is not a success, implementations SHOULD retry the tryEmitError(Throwable) call IF the provided EmitFailureHandler returns true. Otherwise, failures are dealt with in a predefined way that might depend on the actual sink implementation (see below for the vanilla reactor-core behavior).

Generally, tryEmitError(Throwable) is preferable since it allows a custom handling of error cases, although this implies checking the returned EmitResult and correctly acting on it. This API is intended as a good default for convenience.

When the EmitResult is not a success, vanilla reactor-core operators have the following behavior:

Might throw an unchecked exception as a last resort (eg. in case of a fatal error downstream which cannot be propagated to any asynchronous handler, a bubbling exception, a EmitResult#FAIL_NON_SERIALIZED as described above, ...).

Parameters
error:Throwable

the exception to signal, not null

failureHandler:Sinks.EmitFailureHandler

the failure handler that allows retrying failed EmitResult.

Annotations
@Override