Class AbstractChannelConsumer<T>

java.lang.Object
io.activej.reactor.AbstractReactive
io.activej.reactor.ImplicitlyReactive
io.activej.async.process.AbstractAsyncCloseable
io.activej.csp.consumer.AbstractChannelConsumer<T>
All Implemented Interfaces:
io.activej.async.process.AsyncCloseable, ChannelConsumer<T>, io.activej.reactor.Reactive
Direct Known Subclasses:
ChannelFileWriter, OfAnotherReactor, OfAsyncConsumer, OfConsumer, OfException, OfLazyProvider, OfOutputStream, OfPromise, Recycling

public abstract class AbstractChannelConsumer<T> extends io.activej.async.process.AbstractAsyncCloseable implements ChannelConsumer<T>
  • Field Summary

    Fields inherited from class io.activej.reactor.AbstractReactive

    reactor

    Fields inherited from interface io.activej.async.process.AsyncCloseable

    STATIC
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    AbstractChannelConsumer(@Nullable io.activej.async.process.AsyncCloseable closeable)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final io.activej.promise.Promise<Void>
    accept(T value)
    Consumes a provided value and returns a Promise as a marker of success.
    protected abstract io.activej.promise.Promise<Void>
    doAccept(T value)
     

    Methods inherited from class io.activej.async.process.AbstractAsyncCloseable

    closeEx, doSanitize, getCloseable, getException, isClosed, onCleanup, onClosed, sanitize, setCloseable

    Methods inherited from class io.activej.reactor.AbstractReactive

    getReactor

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.activej.async.process.AsyncCloseable

    close, closeEx
  • Constructor Details

    • AbstractChannelConsumer

      protected AbstractChannelConsumer()
    • AbstractChannelConsumer

      protected AbstractChannelConsumer(@Nullable @Nullable io.activej.async.process.AsyncCloseable closeable)
  • Method Details

    • doAccept

      protected abstract io.activej.promise.Promise<Void> doAccept(@Nullable T value)
    • accept

      public final io.activej.promise.Promise<Void> accept(@Nullable T value)
      Description copied from interface: ChannelConsumer
      Consumes a provided value and returns a Promise as a marker of success.
      Specified by:
      accept in interface ChannelConsumer<T>