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
public class DefaultFullHttpRequest extends DefaultHttpRequest implements FullHttpRequest
Default implementation ofFullHttpRequest.
-
-
Field Summary
-
Fields inherited from interface io.netty.handler.codec.http.LastHttpContent
EMPTY_LAST_CONTENT
-
-
Constructor Summary
Constructors Constructor Description DefaultFullHttpRequest(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.Use theDefaultFullHttpRequest(HttpVersion, HttpMethod, String, ByteBuf, HttpHeadersFactory, HttpHeadersFactory)constructor instead.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.buffer.ByteBufcontent()FullHttpRequestcopy()FullHttpRequestduplicate()booleanequals(Object o)inthashCode()intrefCnt()booleanrelease()booleanrelease(int decrement)FullHttpRequestreplace(io.netty.buffer.ByteBuf content)FullHttpRequestretain()FullHttpRequestretain(int increment)FullHttpRequestretainedDuplicate()FullHttpRequestsetMethod(HttpMethod method)Set theHttpMethodof thisHttpRequest.FullHttpRequestsetProtocolVersion(HttpVersion version)Set the protocol version of thisHttpMessageFullHttpRequestsetUri(String uri)Set the requested URI (or alternatively, path)StringtoString()FullHttpRequesttouch()FullHttpRequesttouch(Object hint)HttpHeaderstrailingHeaders()-
Methods inherited from class io.netty.handler.codec.http.DefaultHttpRequest
getMethod, getUri, method, 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, uri
-
-
-
-
Constructor Detail
-
DefaultFullHttpRequest
public DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri)
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 Detail
-
trailingHeaders
public HttpHeaders 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
public FullHttpRequest 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
public FullHttpRequest retain(int increment)
- 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
public FullHttpRequest 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
public FullHttpRequest touch(Object hint)
- 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
public FullHttpRequest setProtocolVersion(HttpVersion version)
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
public FullHttpRequest setMethod(HttpMethod method)
Description copied from interface:HttpRequestSet theHttpMethodof thisHttpRequest.- Specified by:
setMethodin interfaceFullHttpRequest- Specified by:
setMethodin interfaceHttpRequest- Overrides:
setMethodin classDefaultHttpRequest
-
setUri
public FullHttpRequest setUri(String uri)
Description copied from interface:HttpRequestSet the requested URI (or alternatively, path)- Specified by:
setUriin interfaceFullHttpRequest- Specified by:
setUriin interfaceHttpRequest- Overrides:
setUriin classDefaultHttpRequest
-
copy
public FullHttpRequest 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
public FullHttpRequest 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
public FullHttpRequest 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
public FullHttpRequest replace(io.netty.buffer.ByteBuf content)
- 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
public boolean equals(Object o)
- Overrides:
equalsin classDefaultHttpRequest
-
toString
public String toString()
- Overrides:
toStringin classDefaultHttpRequest
-
-