Package com.linecorp.armeria.common
Class FilteredHttpResponse
java.lang.Object
com.linecorp.armeria.common.stream.AggregationSupport
com.linecorp.armeria.common.stream.FilteredStreamMessage<HttpObject,HttpObject>
com.linecorp.armeria.common.FilteredHttpResponse
- All Implemented Interfaces:
HttpMessage
,HttpResponse
,Response
,StreamMessage<HttpObject>
,org.reactivestreams.Publisher<HttpObject>
public abstract class FilteredHttpResponse
extends FilteredStreamMessage<HttpObject,HttpObject>
implements HttpResponse
An
HttpResponse
that filters objects as they are published. The filtering
will happen from an I/O thread, meaning the order of the filtering will match the
order that the delegate
processes the objects in.-
Constructor Summary
ModifierConstructorDescriptionprotected
FilteredHttpResponse
(HttpResponse delegate) Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber.protected
FilteredHttpResponse
(HttpResponse delegate, boolean withPooledObjects) (Advanced users only) Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber. -
Method Summary
Methods inherited from class com.linecorp.armeria.common.stream.FilteredStreamMessage
abort, abort, beforeComplete, beforeError, beforeSubscribe, collect, defaultSubscriberExecutor, demand, filter, isEmpty, isOpen, onCancellation, subscribe, subscribe, whenComplete
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.common.HttpMessage
decode, decode
Methods inherited from interface com.linecorp.armeria.common.HttpResponse
aggregate, aggregate, aggregateWithPooledObjects, aggregateWithPooledObjects, mapData, mapError, mapHeaders, mapInformational, mapTrailers, peekData, peekError, peekHeaders, peekTrailers, recover, recover, split, split, toDuplicator, toDuplicator, toDuplicator, toDuplicator, whenComplete
Methods inherited from interface com.linecorp.armeria.common.stream.StreamMessage
abort, abort, collect, collect, collect, decode, decode, defaultSubscriberExecutor, demand, endWith, filter, isComplete, isEmpty, isOpen, map, mapAsync, mapParallel, mapParallel, peek, peek, recoverAndResume, recoverAndResume, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, toInputStream, toInputStream, writeTo
-
Constructor Details
-
FilteredHttpResponse
Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber. -
FilteredHttpResponse
(Advanced users only) Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber.- Parameters:
withPooledObjects
- iftrue
,FilteredStreamMessage.filter(Object)
receives the pooledHttpData
as is, without making a copy. If you don't know what this means, useFilteredHttpResponse(HttpResponse)
.- See Also:
-
-
Method Details
-
aggregate
Description copied from class:AggregationSupport
Aggregates anHttpMessage
into anAggregatedHttpMessage
using the specifiedAggregationOptions
.Note that this method is added for internal usage. Therefore, you must not override or call this method if you are not familiar with Armeria's internal implementation.
- Specified by:
aggregate
in interfaceHttpResponse
- Overrides:
aggregate
in classAggregationSupport
-