Class AbstractSinglePublisher<T>

java.lang.Object
org.eclipse.jetty.reactive.client.internal.AbstractSinglePublisher<T>
Type Parameters:
T - the type of items emitted by this Publisher
All Implemented Interfaces:
org.reactivestreams.Publisher<T>, org.reactivestreams.Subscription
Direct Known Subclasses:
AbstractEventPublisher, AbstractSingleProcessor, QueuedSinglePublisher, StringContent

public abstract class AbstractSinglePublisher<T>
extends Object
implements org.reactivestreams.Publisher<T>, org.reactivestreams.Subscription
A Publisher that supports a single Subscriber.
  • Constructor Details

    • AbstractSinglePublisher

      public AbstractSinglePublisher()
  • Method Details

    • subscribe

      public void subscribe​(org.reactivestreams.Subscriber<? super T> subscriber)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<T>
    • subscriber

      protected org.reactivestreams.Subscriber<? super T> subscriber()
    • request

      public void request​(long n)
      Specified by:
      request in interface org.reactivestreams.Subscription
    • onRequest

      protected abstract void onRequest​(org.reactivestreams.Subscriber<? super T> subscriber, long n)
    • onFailure

      protected void onFailure​(org.reactivestreams.Subscriber<? super T> subscriber, Throwable failure)
    • cancel

      public void cancel()
      Specified by:
      cancel in interface org.reactivestreams.Subscription
    • isCancelled

      protected boolean isCancelled()
    • toString

      public String toString()
      Overrides:
      toString in class Object