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 decodedStreamMessagewhich is decoded from a stream ofHttpObjects using the specifiedHttpDecoder.default <T> StreamMessage<T>decode(HttpDecoder<T> decoder, ByteBufAllocator alloc) Creates a decodedStreamMessagewhich is decoded from a stream ofHttpObjects using the specifiedHttpDecoderandByteBufAllocator.mapTrailers(Function<? super HttpHeaders, ? extends HttpHeaders> function) peekTrailers(Consumer<? super HttpHeaders> action) toDuplicator(long maxContentLength) Returns a newStreamMessageDuplicatorthat duplicates thisHttpMessageinto one or moreHttpMessages, which publish the same elements.toDuplicator(EventExecutor executor, long maxContentLength) Returns a newStreamMessageDuplicatorthat duplicates thisHttpMessageinto one or moreHttpMessages, 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 newStreamMessageDuplicatorthat duplicates thisHttpMessageinto one or moreHttpMessages, which publish the same elements. Note that you cannot subscribe to thisHttpMessageanymore 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.ContentTooLargeExceptionis raised if the length of the bufferedHttpDatais greater than this value.
-
toDuplicator
Returns a newStreamMessageDuplicatorthat duplicates thisHttpMessageinto one or moreHttpMessages, which publish the same elements. Note that you cannot subscribe to thisHttpMessageanymore 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.ContentTooLargeExceptionis raised if the length of the bufferedHttpDatais greater than this value.
-
decode
Creates a decodedStreamMessagewhich is decoded from a stream ofHttpObjects using the specifiedHttpDecoder. -
decode
Creates a decodedStreamMessagewhich is decoded from a stream ofHttpObjects using the specifiedHttpDecoderandByteBufAllocator. -
mapData
-
mapTrailers
-
peekData
-
peekTrailers
-