Top Fields Constructors Methods
reactor.core.publisher

public Class SinkOneSerialized<T>

extends SinkEmptySerialized<T>
implements InternalOneSink<T>, ContextHolder
Class Inheritance
All Implemented Interfaces
reactor.core.publisher.ContextHolder, reactor.core.publisher.InternalOneSink, reactor.core.publisher.InternalEmptySink, reactor.core.publisher.Sinks.Empty, reactor.core.Scannable, reactor.core.publisher.Sinks.One
Imports
reactor.core.publisher.Sinks.One

Field Summary

Modifier and TypeField and Description
pack-priv final Sinks.One<T>
Inherited from reactor.core.publisher.SinkEmptySerialized:
contextHoldersink

Constructor Summary

AccessConstructor and Description
public
SinkOneSerialized(Sinks.One<T> sinkOne, ContextHolder contextHolder)

Method Summary

Modifier and TypeMethod and Description
public Sinks.EmitResult
tryEmitValue(T
the value to emit and complete with, or null to only trigger an onComplete
t
)

Implements reactor.core.publisher.Sinks.One.tryEmitValue.

Try to complete the Mono with an element, generating an onNext signal immediately followed by an onComplete signal.
Inherited from reactor.core.publisher.SinkEmptySerialized:
asMonocurrentContextcurrentSubscriberCountinnersscanUnsafetryEmitEmptytryEmitError

Field Detail

sinkOneback to summary
pack-priv final Sinks.One<T> sinkOne

Constructor Detail

SinkOneSerializedback to summary
public SinkOneSerialized(Sinks.One<T> sinkOne, ContextHolder contextHolder)

Method Detail

tryEmitValueback to summary
public Sinks.EmitResult tryEmitValue(T t)

Implements reactor.core.publisher.Sinks.One.tryEmitValue.

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

Try to complete the Mono with an element, generating an onNext signal immediately followed by an onComplete signal. A null value will only trigger the onComplete. The result of the attempt is represented as an EmitResult, which possibly indicates error cases.

See the list of failure EmitResult in emitValue(Object, EmitFailureHandler) javadoc for an example of how each of these can be dealt with, to decide if the emit API would be a good enough fit instead.

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, ...).

Parameters
t:T

the value to emit and complete with, or null to only trigger an onComplete

Returns:Sinks.EmitResult

an EmitResult, which should be checked to distinguish different possible failures

Annotations
@Override