Package | Description |
---|---|
org.glassfish.jersey.internal.jsr166 |
Contains a subset of classes repackaged from the jsr166 written by Doug Lea.
|
org.glassfish.jersey.internal.util |
Common Jersey internal miscellaneous utility classes.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
Flow.Processor<T,R>
A component that acts as both a Subscriber and Publisher.
|
Modifier and Type | Class and Description |
---|---|
private static class |
SubmissionPublisher.ConsumerSubscriber<T>
Subscriber for method consume
|
Modifier and Type | Field and Description |
---|---|
(package private) Flow.Subscriber<? super T> |
SubmissionPublisher.BufferedSubscription.subscriber |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.function.BiConsumer<? super Flow.Subscriber<? super T>,? super java.lang.Throwable> |
SubmissionPublisher.onNextHandler |
(package private) java.util.function.BiConsumer<? super Flow.Subscriber<? super T>,? super java.lang.Throwable> |
SubmissionPublisher.BufferedSubscription.onNextHandler |
Modifier and Type | Method and Description |
---|---|
java.util.List<Flow.Subscriber<? super T>> |
SubmissionPublisher.getSubscribers()
Returns a list of current subscribers for monitoring and
tracking purposes, not for invoking
Flow.Subscriber
methods on the subscribers. |
Modifier and Type | Method and Description |
---|---|
private boolean |
SubmissionPublisher.BufferedSubscription.checkControl(Flow.Subscriber<? super T> s,
int c)
Responds to control events in consume().
|
private boolean |
SubmissionPublisher.BufferedSubscription.checkEmpty(Flow.Subscriber<? super T> s,
int c)
Responds to apparent emptiness in consume().
|
private void |
SubmissionPublisher.BufferedSubscription.handleOnNext(Flow.Subscriber<? super T> s,
java.lang.Throwable ex)
Processes exception in Subscriber.onNext.
|
boolean |
SubmissionPublisher.isSubscribed(Flow.Subscriber<? super T> subscriber)
Returns true if the given Subscriber is currently subscribed.
|
void |
Flow.Publisher.subscribe(Flow.Subscriber<? super T> subscriber)
Adds the given Subscriber if possible.
|
void |
SubmissionPublisher.subscribe(Flow.Subscriber<? super T> subscriber)
Adds the given Subscriber unless already subscribed.
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
SubmissionPublisher.doOffer(long nanos,
T item,
java.util.function.BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Common implementation for both forms of offer
|
int |
SubmissionPublisher.offer(T item,
java.util.function.BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method. |
int |
SubmissionPublisher.offer(T item,
long timeout,
java.util.concurrent.TimeUnit unit,
java.util.function.BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method, blocking while
resources for any subscription are unavailable, up to the
specified timeout or until the caller thread is interrupted, at
which point the given handler (if non-null) is invoked, and if it
returns true, retried once. |
Constructor and Description |
---|
BufferedSubscription(Flow.Subscriber<? super T> subscriber,
java.util.concurrent.Executor executor,
java.util.function.BiConsumer<? super Flow.Subscriber<? super T>,? super java.lang.Throwable> onNextHandler,
int maxBufferCapacity) |
Constructor and Description |
---|
BufferedSubscription(Flow.Subscriber<? super T> subscriber,
java.util.concurrent.Executor executor,
java.util.function.BiConsumer<? super Flow.Subscriber<? super T>,? super java.lang.Throwable> onNextHandler,
int maxBufferCapacity) |
SubmissionPublisher(java.util.concurrent.Executor executor,
int maxBufferCapacity,
java.util.function.BiConsumer<? super Flow.Subscriber<? super T>,? super java.lang.Throwable> handler)
Creates a new SubmissionPublisher using the given Executor for
async delivery to subscribers, with the given maximum buffer size
for each subscriber, and, if non-null, the given handler invoked
when any Subscriber throws an exception in method
onNext . |
Modifier and Type | Class and Description |
---|---|
static class |
JerseyPublisher.SubscriberWrapper<T> |
Modifier and Type | Field and Description |
---|---|
private Flow.Subscriber<? super T> |
JerseyPublisher.SubscriberWrapper.subscriber |
Modifier and Type | Method and Description |
---|---|
Flow.Subscriber<? super T> |
JerseyPublisher.SubscriberWrapper.getWrappedSubscriber() |
Modifier and Type | Method and Description |
---|---|
private JerseyPublisher.SubscriberWrapper |
JerseyPublisher.getSubscriberWrapper(Flow.Subscriber subscriber) |
private boolean |
JerseyPublisher.onDrop(Flow.Subscriber<? super T> subscriber,
T t) |
void |
JerseyPublisher.subscribe(Flow.Subscriber<? super T> subscriber) |
Modifier and Type | Method and Description |
---|---|
private int |
JerseyPublisher.offer(T item,
java.util.function.BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method. |
private int |
JerseyPublisher.offer(T item,
long timeout,
java.util.concurrent.TimeUnit unit,
java.util.function.BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
Publishes the given item, if possible, to each current subscriber
by asynchronously invoking its
onNext method,
blocking while resources for any subscription are unavailable,
up to the specified timeout or until the caller thread is
interrupted, at which point the given handler (if non-null) is
invoked, and if it returns true, retried once. |
Constructor and Description |
---|
SubscriberWrapper(Flow.Subscriber<? super T> subscriber) |