Uses of Interface
java.util.concurrent.Flow.Subscriber
-
Packages that use Flow.Subscriber 软件包 描述 java.net.http HTTP客户端和WebSocket APIjava.util.concurrent 实用类通常在并发编程中有用。 -
-
Uses of Flow.Subscriber in java.net.http
Subinterfaces of Flow.Subscriber in java.net.http 变量和类型 接口 描述 static interface
HttpResponse.BodySubscriber<T>
BodySubscriber
响应正文字节并将它们转换为更高级别的Java类型。Methods in java.net.http with type parameters of type Flow.Subscriber 变量和类型 方法 描述 static <S extends Flow.Subscriber<? super String>,T>
HttpResponse.BodyHandler<T>HttpResponse.BodyHandlers. fromLineSubscriber(S subscriber, Function<? super S,? extends T> finisher, String lineSeparator)
返回响应身体处理程序返回一个BodySubscriber
<T>
从获得的BodySubscribers.fromLineSubscriber(subscriber, finisher, charset, lineSeparator)
,用给定的subscriber
,finisher
功能,和在线分离器。static <S extends Flow.Subscriber<? super String>,T>
HttpResponse.BodySubscriber<T>HttpResponse.BodySubscribers. fromLineSubscriber(S subscriber, Function<? super S,? extends T> finisher, Charset charset, String lineSeparator)
返回一个主体订阅者,它将所有响应主体Flow.Subscriber
转发给给定的Flow.Subscriber
。static <S extends Flow.Subscriber<? super List<ByteBuffer>>,T>
HttpResponse.BodyHandler<T>HttpResponse.BodyHandlers. fromSubscriber(S subscriber, Function<? super S,? extends T> finisher)
返回响应身体处理程序返回一个BodySubscriber
<T>
从获得的HttpResponse.BodySubscribers.fromSubscriber(Subscriber, Function)
,用给定的subscriber
和finisher
功能。static <S extends Flow.Subscriber<? super List<ByteBuffer>>,T>
HttpResponse.BodySubscriber<T>HttpResponse.BodySubscribers. fromSubscriber(S subscriber, Function<? super S,? extends T> finisher)
返回一个主体订阅者,它将所有响应主体转发给给定的Flow.Subscriber
。Methods in java.net.http with parameters of type Flow.Subscriber 变量和类型 方法 描述 static HttpResponse.BodyHandler<Void>
HttpResponse.BodyHandlers. fromLineSubscriber(Flow.Subscriber<? super String> subscriber)
返回响应身体处理程序返回一个BodySubscriber
<Void>
从获得的BodySubscribers.fromLineSubscriber(subscriber, s -> null, charset, null)
,用给定的subscriber
。static HttpResponse.BodySubscriber<Void>
HttpResponse.BodySubscribers. fromLineSubscriber(Flow.Subscriber<? super String> subscriber)
返回一个主体订阅者,它将所有响应主体Flow.Subscriber
转发给给定的Flow.Subscriber
。static HttpResponse.BodyHandler<Void>
HttpResponse.BodyHandlers. fromSubscriber(Flow.Subscriber<? super List<ByteBuffer>> subscriber)
返回响应身体处理程序返回一个BodySubscriber
<Void>
从获得的HttpResponse.BodySubscribers.fromSubscriber(Subscriber)
,用给定的subscriber
。static HttpResponse.BodySubscriber<Void>
HttpResponse.BodySubscribers. fromSubscriber(Flow.Subscriber<? super List<ByteBuffer>> subscriber)
返回一个主体订阅者,它将所有响应主体转发给给定的Flow.Subscriber
。 -
Uses of Flow.Subscriber in java.util.concurrent
Subinterfaces of Flow.Subscriber in java.util.concurrent 变量和类型 接口 描述 static interface
Flow.Processor<T,R>
充当订阅服务器和发布服务器的组件。Methods in java.util.concurrent that return types with arguments of type Flow.Subscriber 变量和类型 方法 描述 List<Flow.Subscriber<? super T>>
SubmissionPublisher. getSubscribers()
返回当前订阅者列表以进行监视和跟踪,而不是在订阅者上调用Flow.Subscriber
方法。Methods in java.util.concurrent with parameters of type Flow.Subscriber 变量和类型 方法 描述 boolean
SubmissionPublisher. isSubscribed(Flow.Subscriber<? super T> subscriber)
如果当前订阅了给定订阅服务器,则返回true。void
Flow.Publisher. subscribe(Flow.Subscriber<? super T> subscriber)
如果可能,添加给定的订阅者。void
SubmissionPublisher. subscribe(Flow.Subscriber<? super T> subscriber)
除非已订阅,否则添加给定的订阅者。Method parameters in java.util.concurrent with type arguments of type Flow.Subscriber 变量和类型 方法 描述 int
SubmissionPublisher. offer(T item, long timeout, TimeUnit unit, BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
如果可能,通过异步调用其onNext
方法将给定项目发布给每个当前订阅者,阻止任何订阅的资源不可用,直到指定的超时或直到调用者线程被中断,此时给定的处理程序(如果非-null)被调用,如果返回true,则重试一次。int
SubmissionPublisher. offer(T item, BiPredicate<Flow.Subscriber<? super T>,? super T> onDrop)
如果可能,通过异步调用其onNext
方法将给定项发布到每个当前订户。Constructor parameters in java.util.concurrent with type arguments of type Flow.Subscriber 构造器 描述 SubmissionPublisher(Executor executor, int maxBufferCapacity, BiConsumer<? super Flow.Subscriber<? super T>,? super 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 methodonNext
.
-