Package com.linecorp.armeria.common
Class FilteredHttpResponse
java.lang.Object
com.linecorp.armeria.common.stream.FilteredStreamMessage<HttpObject,HttpObject>
com.linecorp.armeria.common.FilteredHttpResponse
- All Implemented Interfaces:
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
Constructors Modifier Constructor Description protected
FilteredHttpResponse(HttpResponse delegate)
Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber.protected
FilteredHttpResponse(HttpResponse delegate, boolean withPooledObjects)
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, defaultSubscriberExecutor, drainAll, drainAll, filter, isEmpty, isOpen, 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.HttpResponse
aggregate, aggregate, aggregateWithPooledObjects, aggregateWithPooledObjects, toDuplicator, toDuplicator, toDuplicator, toDuplicator, whenComplete
Methods inherited from interface com.linecorp.armeria.common.stream.StreamMessage
abort, abort, defaultSubscriberExecutor, drainAll, drainAll, drainAll, drainAll, isComplete, isEmpty, isOpen, subscribe, subscribe, subscribe, subscribe
-
Constructor Details
-
FilteredHttpResponse
Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber. -
FilteredHttpResponse
Creates a newFilteredHttpResponse
that filters objects published bydelegate
before passing to a subscriber.- Parameters:
withPooledObjects
- iftrue
,FilteredStreamMessage.filter(Object)
receives the pooledByteBuf
andByteBufHolder
as is, without making a copy. If you don't know what this means, useFilteredHttpResponse(HttpResponse)
.
-