Interface PooledStreamMessage<T>
- All Superinterfaces:
org.reactivestreams.Publisher<T>
,StreamMessage<T>
- All Known Subinterfaces:
PooledHttpRequest
,PooledHttpResponse
public interface PooledStreamMessage<T> extends StreamMessage<T>
A
StreamMessage
that exposes unsafe APIs for subscribing to pooled objects from the stream.-
Method Summary
Modifier and Type Method Description default void
subscribe(org.reactivestreams.Subscriber<? super T> subscriber)
Deprecated.default void
subscribe(org.reactivestreams.Subscriber<? super T> subscriber, SubscriptionOption... options)
Deprecated.void
subscribe(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor)
Deprecated.void
subscribe(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor, SubscriptionOption... options)
default void
subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber)
Requests to start streaming data to the specifiedSubscriber
.default void
subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, SubscriptionOption... options)
Requests to start streaming data to the specifiedSubscriber
.default void
subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor)
Requests to start streaming data to the specifiedSubscriber
.default void
subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor, SubscriptionOption... options)
Requests to start streaming data to the specifiedSubscriber
.Methods inherited from interface com.linecorp.armeria.common.stream.StreamMessage
abort, abort, defaultSubscriberExecutor, isComplete, isEmpty, isOpen, toDuplicator, toDuplicator, whenComplete
-
Method Details
-
subscribeWithPooledObjects
Requests to start streaming data to the specifiedSubscriber
. If there is a problem subscribing,Subscriber.onError(Throwable)
will be invoked with one of the following exceptions:IllegalStateException
if otherSubscriber
subscribed to this stream already.AbortedStreamException
if this stream has been aborted.CancelledSubscriptionException
if this stream has been cancelled andSubscriptionOption.NOTIFY_CANCELLATION
is specified when subscribed.- Other exceptions that occurred due to an error while retrieving the elements.
-
subscribeWithPooledObjects
default void subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, SubscriptionOption... options)Requests to start streaming data to the specifiedSubscriber
. If there is a problem subscribing,Subscriber.onError(Throwable)
will be invoked with one of the following exceptions:IllegalStateException
if otherSubscriber
subscribed to this stream already.AbortedStreamException
if this stream has been aborted.CancelledSubscriptionException
if this stream has been cancelled andSubscriptionOption.NOTIFY_CANCELLATION
is specified when subscribed.- Other exceptions that occurred due to an error while retrieving the elements.
- Parameters:
options
-SubscriptionOption
s to subscribe with
-
subscribeWithPooledObjects
default void subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor)Requests to start streaming data to the specifiedSubscriber
. If there is a problem subscribing,Subscriber.onError(Throwable)
will be invoked with one of the following exceptions:IllegalStateException
if otherSubscriber
subscribed to this stream already.AbortedStreamException
if this stream has been aborted.CancelledSubscriptionException
if this stream has been cancelled andSubscriptionOption.NOTIFY_CANCELLATION
is specified when subscribed.- Other exceptions that occurred due to an error while retrieving the elements.
- Parameters:
executor
- the executor to subscribe
-
subscribeWithPooledObjects
default void subscribeWithPooledObjects(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor, SubscriptionOption... options)Requests to start streaming data to the specifiedSubscriber
. If there is a problem subscribing,Subscriber.onError(Throwable)
will be invoked with one of the following exceptions:IllegalStateException
if otherSubscriber
subscribed to this stream already.AbortedStreamException
if this stream has been aborted.CancelledSubscriptionException
if this stream has been cancelled andSubscriptionOption.NOTIFY_CANCELLATION
is specified when subscribed.- Other exceptions that occurred due to an error while retrieving the elements.
- Parameters:
executor
- the executor to subscribeoptions
-SubscriptionOption
s to subscribe with
-
subscribe
Deprecated.Requests to start streaming data to the specifiedSubscriber
without pooled objects. When operating onPooledStreamMessage
this should be avoided.- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<T>
- Specified by:
subscribe
in interfaceStreamMessage<T>
-
subscribe
@Deprecated default void subscribe(org.reactivestreams.Subscriber<? super T> subscriber, SubscriptionOption... options)Deprecated.Requests to start streaming data to the specifiedSubscriber
without pooled objects. When operating onPooledStreamMessage
this should be avoided.- Specified by:
subscribe
in interfaceStreamMessage<T>
options
-SubscriptionOption
s to subscribe with
-
subscribe
@Deprecated void subscribe(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor)Deprecated.Requests to start streaming data to the specifiedSubscriber
without pooled objects. When operating onPooledStreamMessage
this should be avoided.- Specified by:
subscribe
in interfaceStreamMessage<T>
executor
- the executor to subscribe
-
subscribe
@Deprecated void subscribe(org.reactivestreams.Subscriber<? super T> subscriber, EventExecutor executor, SubscriptionOption... options)Requests to start streaming data to the specifiedSubscriber
without pooled objects. When operating onPooledStreamMessage
this should be avoided.- Specified by:
subscribe
in interfaceStreamMessage<T>
executor
- the executor to subscribeoptions
-SubscriptionOption
s to subscribe with
-