Top Description Methods
reactor.core.publisher

public Interface SynchronousSink<T>

Known Direct Implementers
reactor.core.publisher.FluxGenerate.GenerateSubscription, reactor.core.publisher.FluxHandle.HandleSubscriber, reactor.core.publisher.FluxHandle.HandleConditionalSubscriber, reactor.core.publisher.FluxHandleFuseable.HandleFuseableSubscriber, reactor.core.publisher.FluxHandleFuseable.HandleFuseableConditionalSubscriber
Type Parameters
<T>
the output value type
Imports
java.util.function.Function, org.reactivestreams.Subscriber, reactor.core.CoreSubscriber, reactor.util.context.Context, .ContextView

Interface to produce synchronously "one signal" to an underlying Subscriber.

At most one next call and/or one complete() or error(Throwable) should be called per invocation of the generator function.

Calling a SynchronousSink outside of a generator consumer or function, e.g. using an async callback, is forbidden. You can FluxSink or MonoSink based generators for these situations.

Method Summary

Modifier and TypeMethod and Description
public void
public default ContextView

Returns:

the current subscriber ContextView.
contextView
()

Return the current subscriber's context as a ContextView for inspection.

public Context

Returns:

the current subscriber Context.
currentContext
()

Deprecated To be removed in 3.6.0 at the earliest. Prefer using #contextView() instead.
Return the current subscriber Context.
public void
error(Throwable
the exception to signal, not null
e
)

public void
next(T
the value to emit, not null
t
)

Try emitting, might throw an unchecked exception.

Method Detail

completeback to summary
public void complete()
See Also
Subscriber#onComplete()
contextViewback to summary
public default ContextView contextView()

Return the current subscriber's context as a ContextView for inspection.

Context can be enriched downstream via Mono#contextWrite(Function) or Flux#contextWrite(Function) operators or directly by a child subscriber overriding CoreSubscriber#currentContext()

Returns:ContextView

the current subscriber ContextView.

currentContextback to summary
public Context currentContext()

Deprecated

To be removed in 3.6.0 at the earliest. Prefer using #contextView() instead.

Return the current subscriber Context.

Context can be enriched via Mono#contextWrite(Function) or Flux#contextWrite(Function) operator or directly by a child subscriber overriding CoreSubscriber#currentContext()

Returns:Context

the current subscriber Context.

Annotations
@Deprecated
errorback to summary
public void error(Throwable e)
Parameters
e:Throwable

the exception to signal, not null

See Also
Subscriber#onError(Throwable)
nextback to summary
public void next(T t)

Try emitting, might throw an unchecked exception.

Parameters
t:T

the value to emit, not null

Exceptions
RuntimeException:
in case of unchecked error during the emission
See Also
Subscriber#onNext(Object)