Class ChannelSuppliers.ChannelSupplierOfValue<T>

java.lang.Object
io.activej.async.process.AbstractAsyncCloseable
io.activej.csp.AbstractChannelSupplier<T>
io.activej.csp.ChannelSuppliers.ChannelSupplierOfValue<T>
All Implemented Interfaces:
io.activej.async.process.AsyncCloseable, ChannelSupplier<T>
Enclosing class:
ChannelSuppliers

public static final class ChannelSuppliers.ChannelSupplierOfValue<T> extends AbstractChannelSupplier<T>
Represents a ChannelSupplier of one value. Returns a promise of the value when get is called for the first time, all subsequent calls will return null.
  • Constructor Details

    • ChannelSupplierOfValue

      public ChannelSupplierOfValue(@NotNull T item)
  • Method Details

    • getValue

      public T getValue()
    • takeValue

      public T takeValue()
    • doGet

      protected io.activej.promise.Promise<T> doGet()
      Specified by:
      doGet in class AbstractChannelSupplier<T>
    • onCleanup

      protected void onCleanup()
      Overrides:
      onCleanup in class io.activej.async.process.AbstractAsyncCloseable