APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.net.http

pack-priv Class PullPublisher<T>

extends Object
implements Flow.Publisher<T>
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Flow.Publisher
Imports
java.util.concurrent.Flow, jdk.internal.net.http.common.Demand, .SequentialScheduler

A publisher that publishes items obtained from the given CheckedIterable. Each new subscription gets a new CheckedIterator.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final CheckedIterable<T>
private final Throwable

Constructor Summary

AccessConstructor and Description
pack-priv
PullPublisher(CheckedIterable<T> iterable, Throwable throwable)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
subscribe(Flow.Subscriber<? super T> subscriber)

Implements java.util.concurrent.Flow.Publisher.subscribe.

Adds the given Subscriber if possible.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iterableback to summary
private final CheckedIterable<T> iterable
throwableback to summary
private final Throwable throwable

Constructor Detail

PullPublisherback to summary
pack-priv PullPublisher(CheckedIterable<T> iterable, Throwable throwable)
PullPublisherback to summary
pack-priv PullPublisher(CheckedIterable<T> iterable)

Method Detail

subscribeback to summary
public void subscribe(Flow.Subscriber<? super T> subscriber)

Implements java.util.concurrent.Flow.Publisher.subscribe.

Doc from java.util.concurrent.Flow.Publisher.subscribe.

Adds the given Subscriber if possible. If already subscribed, or the attempt to subscribe fails due to policy violations or errors, the Subscriber's onError method is invoked with an IllegalStateException. Otherwise, the Subscriber's onSubscribe method is invoked with a new Subscription. Subscribers may enable receiving items by invoking the request method of this Subscription, and may unsubscribe by invoking its cancel method.

Annotations
@Override
jdk.internal.net.http back to summary

private Class PullPublisher.Subscription

extends Object
implements Subscription
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Flow.Subscription

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private volatile boolean
private volatile boolean
private final Demand
private volatile Throwable
private final CheckedIterator<T>
pack-priv final SequentialScheduler
private final Flow.Subscriber<? super T>

Constructor Summary

AccessConstructor and Description
pack-priv
Subscription(Flow.Subscriber<? super T> subscriber, CheckedIterator<T> iter, Throwable throwable)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Implements java.util.concurrent.Flow.Subscription.cancel.

Causes the Subscriber to (eventually) stop receiving messages.

public void
request(long n)

Implements java.util.concurrent.Flow.Subscription.request.

Adds the given number n of items to the current unfulfilled demand for this subscription.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancelledback to summary
private volatile boolean cancelled
completedback to summary
private volatile boolean completed
demandback to summary
private final Demand demand
errorback to summary
private volatile Throwable error
iterback to summary
private final CheckedIterator<T> iter
pullSchedulerback to summary
pack-priv final SequentialScheduler pullScheduler
subscriberback to summary
private final Flow.Subscriber<? super T> subscriber

Constructor Detail

Subscriptionback to summary
pack-priv Subscription(Flow.Subscriber<? super T> subscriber, CheckedIterator<T> iter, Throwable throwable)

Method Detail

cancelback to summary
public void cancel()

Implements java.util.concurrent.Flow.Subscription.cancel.

Doc from java.util.concurrent.Flow.Subscription.cancel.

Causes the Subscriber to (eventually) stop receiving messages. Implementation is best-effort -- additional messages may be received after invoking this method. A cancelled subscription need not ever receive an onComplete or onError signal.

Annotations
@Override
requestback to summary
public void request(long n)

Implements java.util.concurrent.Flow.Subscription.request.

Doc from java.util.concurrent.Flow.Subscription.request.

Adds the given number n of items to the current unfulfilled demand for this subscription. If n is less than or equal to zero, the Subscriber will receive an onError signal with an IllegalArgumentException argument. Otherwise, the Subscriber will receive up to n additional onNext invocations (or fewer if terminated).

Annotations
@Override
jdk.internal.net.http back to summary

pack-priv final Class PullPublisher.Subscription.PullTask

extends CompleteRestartableTask
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected void
Inherited from jdk.internal.net.http.common.SequentialScheduler.CompleteRestartableTask:
run

Constructor Detail

PullTaskback to summary
pack-priv PullTask()