Package io.netty.handler.codec.http
Class DefaultFullHttpRequest
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
io.netty.handler.codec.http.DefaultHttpRequest
io.netty.handler.codec.http.DefaultFullHttpRequest
- All Implemented Interfaces:
io.netty.buffer.ByteBufHolder,io.netty.handler.codec.DecoderResultProvider,FullHttpMessage,FullHttpRequest,HttpContent,HttpMessage,HttpObject,HttpRequest,LastHttpContent,io.netty.util.ReferenceCounted
Default implementation of
FullHttpRequest.-
Field Summary
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) Create a full HTTP response with the given HTTP version, method, and URI.DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders) Deprecated.DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content) Create a full HTTP response with the given HTTP version, method, URI, and contents.DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, boolean validateHeaders) Deprecated.Use theDefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf, HttpHeadersFactory, HttpHeadersFactory)constructor instead.DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, HttpHeadersFactory headersFactory, HttpHeadersFactory trailersFactory) Create a full HTTP response with the given HTTP version, method, URI, contents, and factories for creating headers and trailers.DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader) Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects. -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufcontent()copy()booleaninthashCode()intrefCnt()booleanrelease()booleanrelease(int decrement) replace(io.netty.buffer.ByteBuf content) retain()retain(int increment) setMethod(HttpMethod method) Set theHttpMethodof thisHttpRequest.setProtocolVersion(HttpVersion version) Set the protocol version of thisHttpMessageSet the requested URI (or alternatively, path)toString()touch()Methods inherited from class io.netty.handler.codec.http.DefaultHttpRequest
getMethod, getUri, method, uriMethods inherited from class io.netty.handler.codec.http.DefaultHttpMessage
getProtocolVersion, headers, protocolVersionMethods inherited from class io.netty.handler.codec.http.DefaultHttpObject
decoderResult, getDecoderResult, setDecoderResultMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResultMethods inherited from interface io.netty.handler.codec.http.HttpMessage
getProtocolVersion, headers, protocolVersionMethods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResultMethods inherited from interface io.netty.handler.codec.http.HttpRequest
getMethod, getUri, method, uri
-
Constructor Details
-
DefaultFullHttpRequest
Create a full HTTP response with the given HTTP version, method, and URI. -
DefaultFullHttpRequest
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content) Create a full HTTP response with the given HTTP version, method, URI, and contents. -
DefaultFullHttpRequest
@Deprecated public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, boolean validateHeaders) Deprecated.Use theDefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf, HttpHeadersFactory, HttpHeadersFactory)constructor instead.Create a full HTTP response with the given HTTP version, method, URI, and optional validation. -
DefaultFullHttpRequest
@Deprecated public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, boolean validateHeaders) Deprecated.Use theDefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf, HttpHeadersFactory, HttpHeadersFactory)constructor instead.Create a full HTTP response with the given HTTP version, method, URI, contents, and optional validation. -
DefaultFullHttpRequest
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, HttpHeadersFactory headersFactory, HttpHeadersFactory trailersFactory) Create a full HTTP response with the given HTTP version, method, URI, contents, and factories for creating headers and trailers.The recommended default header factory is
DefaultHttpHeadersFactory.headersFactory(), and the recommended default trailer factory isDefaultHttpHeadersFactory.trailersFactory(). -
DefaultFullHttpRequest
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader) Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
-
-
Method Details
-
trailingHeaders
- Specified by:
trailingHeadersin interfaceLastHttpContent
-
content
public io.netty.buffer.ByteBuf content()- Specified by:
contentin interfaceio.netty.buffer.ByteBufHolder
-
refCnt
public int refCnt()- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
retain
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceFullHttpMessage- Specified by:
retainin interfaceFullHttpRequest- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
retain
- Specified by:
retainin interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainin interfaceFullHttpMessage- Specified by:
retainin interfaceFullHttpRequest- Specified by:
retainin interfaceHttpContent- Specified by:
retainin interfaceLastHttpContent- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
touch
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceFullHttpMessage- Specified by:
touchin interfaceFullHttpRequest- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
touch
- Specified by:
touchin interfaceio.netty.buffer.ByteBufHolder- Specified by:
touchin interfaceFullHttpMessage- Specified by:
touchin interfaceFullHttpRequest- Specified by:
touchin interfaceHttpContent- Specified by:
touchin interfaceLastHttpContent- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int decrement) - Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
setProtocolVersion
Description copied from interface:HttpMessageSet the protocol version of thisHttpMessage- Specified by:
setProtocolVersionin interfaceFullHttpRequest- Specified by:
setProtocolVersionin interfaceHttpMessage- Specified by:
setProtocolVersionin interfaceHttpRequest- Overrides:
setProtocolVersionin classDefaultHttpRequest
-
setMethod
Description copied from interface:HttpRequestSet theHttpMethodof thisHttpRequest.- Specified by:
setMethodin interfaceFullHttpRequest- Specified by:
setMethodin interfaceHttpRequest- Overrides:
setMethodin classDefaultHttpRequest
-
setUri
Description copied from interface:HttpRequestSet the requested URI (or alternatively, path)- Specified by:
setUriin interfaceFullHttpRequest- Specified by:
setUriin interfaceHttpRequest- Overrides:
setUriin classDefaultHttpRequest
-
copy
- Specified by:
copyin interfaceio.netty.buffer.ByteBufHolder- Specified by:
copyin interfaceFullHttpMessage- Specified by:
copyin interfaceFullHttpRequest- Specified by:
copyin interfaceHttpContent- Specified by:
copyin interfaceLastHttpContent
-
duplicate
- Specified by:
duplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
duplicatein interfaceFullHttpMessage- Specified by:
duplicatein interfaceFullHttpRequest- Specified by:
duplicatein interfaceHttpContent- Specified by:
duplicatein interfaceLastHttpContent
-
retainedDuplicate
- Specified by:
retainedDuplicatein interfaceio.netty.buffer.ByteBufHolder- Specified by:
retainedDuplicatein interfaceFullHttpMessage- Specified by:
retainedDuplicatein interfaceFullHttpRequest- Specified by:
retainedDuplicatein interfaceHttpContent- Specified by:
retainedDuplicatein interfaceLastHttpContent
-
replace
- Specified by:
replacein interfaceio.netty.buffer.ByteBufHolder- Specified by:
replacein interfaceFullHttpMessage- Specified by:
replacein interfaceFullHttpRequest- Specified by:
replacein interfaceHttpContent- Specified by:
replacein interfaceLastHttpContent
-
hashCode
public int hashCode()- Overrides:
hashCodein classDefaultHttpRequest
-
equals
- Overrides:
equalsin classDefaultHttpRequest
-
toString
- Overrides:
toStringin classDefaultHttpRequest
-
DefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf, HttpHeadersFactory, HttpHeadersFactory)constructor instead.