Package io.micronaut.http.netty.stream
Class DefaultStreamedHttpResponse
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
io.netty.handler.codec.http.DefaultHttpResponse
io.micronaut.http.netty.stream.DefaultStreamedHttpResponse
- All Implemented Interfaces:
HotObservable<io.netty.handler.codec.http.HttpContent>
,StreamedHttpMessage
,StreamedHttpResponse
,io.netty.handler.codec.DecoderResultProvider
,io.netty.handler.codec.http.HttpMessage
,io.netty.handler.codec.http.HttpObject
,io.netty.handler.codec.http.HttpResponse
,Publisher<io.netty.handler.codec.http.HttpContent>
@Internal
public class DefaultStreamedHttpResponse
extends io.netty.handler.codec.http.DefaultHttpResponse
implements StreamedHttpResponse, HotObservable<io.netty.handler.codec.http.HttpContent>
A default streamed HTTP response.
- Since:
- 1.0
- Author:
- jroper, Graeme Rocher
-
Constructor Summary
ConstructorDescriptionDefaultStreamedHttpResponse
(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, boolean validateHeaders, Publisher<io.netty.handler.codec.http.HttpContent> stream) DefaultStreamedHttpResponse
(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, io.netty.handler.codec.http.HttpHeaders headers, Publisher<io.netty.handler.codec.http.HttpContent> stream) DefaultStreamedHttpResponse
(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, Publisher<io.netty.handler.codec.http.HttpContent> stream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Releases buffered data if there is no subscriber.void
subscribe
(Subscriber<? super io.netty.handler.codec.http.HttpContent> subscriber) Methods inherited from class io.netty.handler.codec.http.DefaultHttpResponse
equals, getStatus, hashCode, setProtocolVersion, setStatus, status, toString
Methods inherited from class io.netty.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, getDecoderResult, setDecoderResult
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersion
Methods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpResponse
getStatus, setProtocolVersion, setStatus, status
-
Constructor Details
-
DefaultStreamedHttpResponse
public DefaultStreamedHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, Publisher<io.netty.handler.codec.http.HttpContent> stream) - Parameters:
version
- The Http Versionstatus
- The Http response statusstream
- The publisher
-
DefaultStreamedHttpResponse
public DefaultStreamedHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, boolean validateHeaders, Publisher<io.netty.handler.codec.http.HttpContent> stream) - Parameters:
version
- The Http Versionstatus
- The Http response statusvalidateHeaders
- Whether to validate the headersstream
- The publisher
-
DefaultStreamedHttpResponse
public DefaultStreamedHttpResponse(io.netty.handler.codec.http.HttpVersion version, io.netty.handler.codec.http.HttpResponseStatus status, io.netty.handler.codec.http.HttpHeaders headers, Publisher<io.netty.handler.codec.http.HttpContent> stream) - Parameters:
version
- The Http Versionstatus
- The Http response statusheaders
- The Http headersstream
- The publisher
-
-
Method Details
-
subscribe
-
closeIfNoSubscriber
public void closeIfNoSubscriber()Description copied from interface:HotObservable
Releases buffered data if there is no subscriber.- Specified by:
closeIfNoSubscriber
in interfaceHotObservable<io.netty.handler.codec.http.HttpContent>
-