Package com.linecorp.armeria.common
Interface HttpMessage
- All Superinterfaces:
org.reactivestreams.Publisher<HttpObject>
,StreamMessage<HttpObject>
- All Known Subinterfaces:
HttpRequest
,HttpRequestWriter
,HttpResponse
,HttpResponseWriter
- All Known Implementing Classes:
FilteredHttpRequest
,FilteredHttpResponse
A streamed HTTP/2 message.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> StreamMessage<T>
decode
(HttpDecoder<T> decoder) Creates a decodedStreamMessage
which is decoded from a stream ofHttpObject
s using the specifiedHttpDecoder
.default <T> StreamMessage<T>
decode
(HttpDecoder<T> decoder, ByteBufAllocator alloc) Creates a decodedStreamMessage
which is decoded from a stream ofHttpObject
s using the specifiedHttpDecoder
andByteBufAllocator
.mapTrailers
(Function<? super HttpHeaders, ? extends HttpHeaders> function) peekTrailers
(Consumer<? super HttpHeaders> action) toDuplicator
(long maxContentLength) Returns a newStreamMessageDuplicator
that duplicates thisHttpMessage
into one or moreHttpMessage
s, which publish the same elements.toDuplicator
(EventExecutor executor, long maxContentLength) Returns a newStreamMessageDuplicator
that duplicates thisHttpMessage
into one or moreHttpMessage
s, which publish the same elements.Methods inherited from interface com.linecorp.armeria.common.stream.StreamMessage
abort, abort, collect, collect, collect, decode, decode, defaultSubscriberExecutor, demand, filter, isComplete, isEmpty, isOpen, map, mapAsync, mapError, mapParallel, mapParallel, peek, peek, peekError, recoverAndResume, recoverAndResume, subscribe, subscribe, subscribe, subscribe, subscribe, toDuplicator, toDuplicator, toInputStream, toInputStream, whenComplete, writeTo
-
Method Details
-
toDuplicator
Returns a newStreamMessageDuplicator
that duplicates thisHttpMessage
into one or moreHttpMessage
s, which publish the same elements. Note that you cannot subscribe to thisHttpMessage
anymore after you call this method. To subscribe, callStreamMessageDuplicator.duplicate()
from the returnedStreamMessageDuplicator
.- Parameters:
maxContentLength
- the maximum content length that the duplicator can hold in its buffer.ContentTooLargeException
is raised if the length of the bufferedHttpData
is greater than this value.
-
toDuplicator
Returns a newStreamMessageDuplicator
that duplicates thisHttpMessage
into one or moreHttpMessage
s, which publish the same elements. Note that you cannot subscribe to thisHttpMessage
anymore after you call this method. To subscribe, callStreamMessageDuplicator.duplicate()
from the returnedStreamMessageDuplicator
.- Parameters:
executor
- the executor to duplicatemaxContentLength
- the maximum content length that the duplicator can hold in its buffer.ContentTooLargeException
is raised if the length of the bufferedHttpData
is greater than this value.
-
decode
Creates a decodedStreamMessage
which is decoded from a stream ofHttpObject
s using the specifiedHttpDecoder
. -
decode
Creates a decodedStreamMessage
which is decoded from a stream ofHttpObject
s using the specifiedHttpDecoder
andByteBufAllocator
. -
mapData
-
mapTrailers
-
peekData
-
peekTrailers
-