Top Methods
reactor.core.publisher

pack-priv Interface InternalOneSink<T>

extends Sinks.One<T>, InternalEmptySink<T>
Known Direct Implementers
reactor.core.publisher.SinkOneMulticast, reactor.core.publisher.SinkOneSerialized
Imports
reactor.core.Exceptions, reactor.core.publisher.Sinks.EmissionException, reactor.util.annotation.Nullable

Method Summary

Modifier and TypeMethod and Description
public default void
emitValue(T
the value to emit and complete with, a null is actually acceptable to only trigger an onComplete
value
,
Sinks.EmitFailureHandler
the failure handler that allows retrying failed EmitResult.
failureHandler
)

Implements reactor.core.publisher.Sinks.One.emitValue.

A simplified attempt at emitting a non-null element via the tryEmitValue(Object) API, generating an onNext signal immediately followed by an Subscriber#onComplete() signal.
Inherited from reactor.core.publisher.InternalEmptySink:
emitEmptyemitError
Inherited from reactor.core.publisher.Sinks.One:
tryEmitValue

Method Detail

emitValueback to summary
public default void emitValue(T value, Sinks.EmitFailureHandler failureHandler)

Implements reactor.core.publisher.Sinks.One.emitValue.

Doc from reactor.core.publisher.Sinks.One.emitValue.

A simplified attempt at emitting a non-null element via the tryEmitValue(Object) API, generating an onNext signal immediately followed by an Subscriber#onComplete() signal. If the result of the attempt is not a success, implementations SHOULD retry the tryEmitValue(Object) 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, tryEmitValue(Object) 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
value:T

the value to emit and complete with, a null is actually acceptable to only trigger an onComplete

failureHandler:Sinks.EmitFailureHandler

the failure handler that allows retrying failed EmitResult.

Annotations
@Override