Package io.netty.handler.codec.http
Class DefaultHttpMessage
java.lang.Object
io.netty.handler.codec.http.DefaultHttpObject
io.netty.handler.codec.http.DefaultHttpMessage
- All Implemented Interfaces:
DecoderResultProvider
,HttpMessage
,HttpObject
- Direct Known Subclasses:
DefaultHttpRequest
,DefaultHttpResponse
The default
HttpMessage
implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final HttpHeaders
private HttpVersion
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DefaultHttpMessage
(HttpVersion version) Creates a new instance.protected
DefaultHttpMessage
(HttpVersion version, boolean validateHeaders, boolean singleFieldHeaders) Deprecated.protected
DefaultHttpMessage
(HttpVersion version, HttpHeaders headers) Creates a new instance.protected
DefaultHttpMessage
(HttpVersion version, HttpHeadersFactory headersFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.int
hashCode()
headers()
Returns the headers of this message.Returns the protocol version of thisHttpMessage
setProtocolVersion
(HttpVersion version) Set the protocol version of thisHttpMessage
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, toString, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
Methods inherited from interface io.netty.handler.codec.http.HttpObject
getDecoderResult
-
Field Details
-
HASH_CODE_PRIME
private static final int HASH_CODE_PRIME- See Also:
-
version
-
headers
-
-
Constructor Details
-
DefaultHttpMessage
Creates a new instance. -
DefaultHttpMessage
@Deprecated protected DefaultHttpMessage(HttpVersion version, boolean validateHeaders, boolean singleFieldHeaders) Deprecated.Use theDefaultHttpMessage(HttpVersion, HttpHeadersFactory)
constructor instead, ideally using theDefaultHttpHeadersFactory.headersFactory()
, or a factory that otherwise has validation enabled.Creates a new instance. -
DefaultHttpMessage
Creates a new instance. -
DefaultHttpMessage
Creates a new instance.
-
-
Method Details
-
headers
Description copied from interface:HttpMessage
Returns the headers of this message.- Specified by:
headers
in interfaceHttpMessage
-
getProtocolVersion
Deprecated.- Specified by:
getProtocolVersion
in interfaceHttpMessage
-
protocolVersion
Description copied from interface:HttpMessage
Returns the protocol version of thisHttpMessage
- Specified by:
protocolVersion
in interfaceHttpMessage
-
hashCode
public int hashCode()- Overrides:
hashCode
in classDefaultHttpObject
-
equals
- Overrides:
equals
in classDefaultHttpObject
-
setProtocolVersion
Description copied from interface:HttpMessage
Set the protocol version of thisHttpMessage
- Specified by:
setProtocolVersion
in interfaceHttpMessage
-
DefaultHttpMessage(HttpVersion, HttpHeadersFactory)
constructor instead, ideally using theDefaultHttpHeadersFactory.headersFactory()
, or a factory that otherwise has validation enabled.