org.springframework.http.server.reactive

Class ChannelSendOperator<T>

  • java.lang.Object
    • reactor.core.publisher.Mono<java.lang.Void>
      • org.springframework.http.server.reactive.ChannelSendOperator<T>
  • Type Parameters:
    T - the type of element signaled
    All Implemented Interfaces:
    org.reactivestreams.Publisher<java.lang.Void>, reactor.core.Scannable


    public class ChannelSendOperator<T>
    extends reactor.core.publisher.Mono<java.lang.Void>
    implements reactor.core.Scannable
    Given a write function that accepts a source Publisher<T> to write with and returns Publisher<Void> for the result, this operator helps to defer the invocation of the write function, until we know if the source publisher will begin publishing without an error. If the first emission is an error, the write function is bypassed, and the error is sent directly through the result publisher. Otherwise the write function is invoked.
    Since:
    5.0
    Author:
    Rossen Stoyanchev, Stephane Maldini
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface reactor.core.Scannable

        reactor.core.Scannable.Attr<T>
    • Field Summary

      • Fields inherited from interface reactor.core.Scannable

        OPERATOR_NAME_UNRELATED_WORDS_PATTERN
    • Constructor Summary

      Constructors 
      Constructor and Description
      ChannelSendOperator(org.reactivestreams.Publisher<? extends T> source, java.util.function.Function<org.reactivestreams.Publisher<T>,org.reactivestreams.Publisher<java.lang.Void>> writeFunction) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object scanUnsafe(reactor.core.Scannable.Attr key) 
      void subscribe(reactor.core.CoreSubscriber<? super java.lang.Void> actual) 
      • Methods inherited from class reactor.core.publisher.Mono

        and, as, block, block, blockOptional, blockOptional, cache, cache, cache, cache, cancelOn, cast, checkpoint, checkpoint, checkpoint, compose, concatWith, create, defaultIfEmpty, defer, delay, delay, delayElement, delayElement, delaySubscription, delaySubscription, delaySubscription, delayUntil, dematerialize, doAfterSuccessOrError, doAfterTerminate, doFinally, doOnCancel, doOnDiscard, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnSuccess, doOnSuccessOrError, doOnTerminate, elapsed, elapsed, empty, error, error, expand, expand, expandDeep, expandDeep, filter, filterWhen, first, first, flatMap, flatMapIterable, flatMapMany, flatMapMany, flux, from, fromCallable, fromCompletionStage, fromCompletionStage, fromDirect, fromFuture, fromFuture, fromRunnable, fromSupplier, handle, hasElement, hide, ignoreElement, ignoreElements, just, justOrEmpty, justOrEmpty, log, log, log, log, log, log, map, materialize, mergeWith, metrics, name, never, ofType, onAssembly, onErrorMap, onErrorMap, onErrorMap, onErrorResume, onErrorResume, onErrorResume, onErrorReturn, onErrorReturn, onErrorReturn, onLastAssembly, onTerminateDetach, or, publish, publishOn, repeat, repeat, repeat, repeat, repeatWhen, repeatWhenEmpty, repeatWhenEmpty, retry, retry, retry, retry, retryBackoff, retryBackoff, retryBackoff, retryWhen, sequenceEqual, sequenceEqual, sequenceEqual, single, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscriberContext, subscriberContext, subscriberContext, subscribeWith, switchIfEmpty, tag, take, take, takeUntilOther, then, then, thenEmpty, thenMany, thenReturn, timeout, timeout, timeout, timeout, timeout, timeout, timestamp, timestamp, toFuture, toProcessor, toString, transform, using, using, usingWhen, usingWhen, when, when, whenDelayError, whenDelayError, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipDelayError, zipWhen, zipWhen, zipWith, zipWith
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface reactor.core.Scannable

        actuals, from, inners, isScanAvailable, name, parents, scan, scanOrDefault, stepName, steps, tags
    • Constructor Detail

      • ChannelSendOperator

        public ChannelSendOperator(org.reactivestreams.Publisher<? extends T> source,
                                   java.util.function.Function<org.reactivestreams.Publisher<T>,org.reactivestreams.Publisher<java.lang.Void>> writeFunction)
    • Method Detail

      • scanUnsafe

        @Nullable
        public java.lang.Object scanUnsafe(reactor.core.Scannable.Attr key)
        Specified by:
        scanUnsafe in interface reactor.core.Scannable
      • subscribe

        public void subscribe(reactor.core.CoreSubscriber<? super java.lang.Void> actual)
        Specified by:
        subscribe in class reactor.core.publisher.Mono<java.lang.Void>