Package io.micronaut.http.netty.stream
Class DefaultStreamedHttpRequest
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
io.netty.handler.codec.http.DefaultHttpRequest
io.micronaut.http.netty.stream.DefaultStreamedHttpRequest
- All Implemented Interfaces:
HotObservable<io.netty.handler.codec.http.HttpContent>
,StreamedHttpMessage
,StreamedHttpRequest
,io.netty.handler.codec.DecoderResultProvider
,io.netty.handler.codec.http.HttpMessage
,io.netty.handler.codec.http.HttpObject
,io.netty.handler.codec.http.HttpRequest
,Publisher<io.netty.handler.codec.http.HttpContent>
@Internal
public class DefaultStreamedHttpRequest
extends io.netty.handler.codec.http.DefaultHttpRequest
implements StreamedHttpRequest
A default streamed HTTP request.
- Since:
- 1.0
- Author:
- jroper, Graeme Rocher
-
Constructor Summary
ConstructorDescriptionDefaultStreamedHttpRequest
(io.netty.handler.codec.http.HttpVersion httpVersion, io.netty.handler.codec.http.HttpMethod method, String uri, boolean validateHeaders, Publisher<io.netty.handler.codec.http.HttpContent> stream) DefaultStreamedHttpRequest
(io.netty.handler.codec.http.HttpVersion httpVersion, io.netty.handler.codec.http.HttpMethod method, String uri, Publisher<io.netty.handler.codec.http.HttpContent> stream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Releases the stream if there is no subscriber.boolean
Has the stream been consumed.void
subscribe
(Subscriber<? super io.netty.handler.codec.http.HttpContent> subscriber) Methods inherited from class io.netty.handler.codec.http.DefaultHttpRequest
equals, getMethod, getUri, hashCode, method, setMethod, setProtocolVersion, setUri, toString, uri
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.HttpRequest
getMethod, getUri, method, setMethod, setProtocolVersion, setUri, uri
-
Constructor Details
-
DefaultStreamedHttpRequest
public DefaultStreamedHttpRequest(io.netty.handler.codec.http.HttpVersion httpVersion, io.netty.handler.codec.http.HttpMethod method, String uri, Publisher<io.netty.handler.codec.http.HttpContent> stream) - Parameters:
httpVersion
- The Http Versionmethod
- The Http Methoduri
- The URIstream
- The publisher
-
DefaultStreamedHttpRequest
public DefaultStreamedHttpRequest(io.netty.handler.codec.http.HttpVersion httpVersion, io.netty.handler.codec.http.HttpMethod method, String uri, boolean validateHeaders, Publisher<io.netty.handler.codec.http.HttpContent> stream) - Parameters:
httpVersion
- The Http Versionmethod
- The Http Methoduri
- The URIvalidateHeaders
- Whether to validate the headersstream
- The publisher
-
-
Method Details
-
isConsumed
public boolean isConsumed()Description copied from interface:StreamedHttpRequest
Has the stream been consumed.- Specified by:
isConsumed
in interfaceStreamedHttpRequest
- Returns:
- True if it has
-
subscribe
-
closeIfNoSubscriber
public void closeIfNoSubscriber()Description copied from interface:StreamedHttpRequest
Releases the stream if there is no subscriber.- Specified by:
closeIfNoSubscriber
in interfaceHotObservable<io.netty.handler.codec.http.HttpContent>
- Specified by:
closeIfNoSubscriber
in interfaceStreamedHttpRequest
-