public interface HttpMessage
HttpRequest
and
HttpResponse
.HttpHeaders
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
Object value)
Deprecated.
Use
headers() instead. |
void |
clearHeaders()
Deprecated.
Use
headers() instead. |
boolean |
containsHeader(String name)
Deprecated.
Use
headers() instead. |
ChannelBuffer |
getContent()
Returns the content of this message.
|
String |
getHeader(String name)
Deprecated.
Use
headers() instead. |
Set<String> |
getHeaderNames()
Deprecated.
|
List<Map.Entry<String,String>> |
getHeaders()
Deprecated.
Use
headers() instead. |
List<String> |
getHeaders(String name)
Deprecated.
Use
headers() instead. |
HttpVersion |
getProtocolVersion()
Returns the protocol version of this message.
|
HttpHeaders |
headers()
Returns the headers of this message.
|
boolean |
isChunked()
Returns
true if and only if this message does not have any
content but the HttpChunk s, which is generated by
HttpMessageDecoder consecutively, contain the actual content. |
void |
removeHeader(String name)
Deprecated.
Use
headers() instead. |
void |
setChunked(boolean chunked)
Sets if this message does not have any content but the
HttpChunk s, which is generated by HttpMessageDecoder
consecutively, contain the actual content. |
void |
setContent(ChannelBuffer content)
Sets the content of this message.
|
void |
setHeader(String name,
Iterable<?> values)
Deprecated.
Use
headers() instead. |
void |
setHeader(String name,
Object value)
Deprecated.
Use
headers() instead. |
void |
setProtocolVersion(HttpVersion version)
Sets the protocol version of this message.
|
@Deprecated String getHeader(String name)
headers()
instead.@Deprecated List<String> getHeaders(String name)
headers()
instead.@Deprecated List<Map.Entry<String,String>> getHeaders()
headers()
instead.@Deprecated boolean containsHeader(String name)
headers()
instead.@Deprecated Set<String> getHeaderNames()
Set
of all header names that this message contains.HttpVersion getProtocolVersion()
void setProtocolVersion(HttpVersion version)
HttpHeaders headers()
ChannelBuffer getContent()
isChunked()
returns true
, an
ChannelBuffers.EMPTY_BUFFER
is returned.void setContent(ChannelBuffer content)
null
is specified,
the content of this message will be set to ChannelBuffers.EMPTY_BUFFER
.@Deprecated void addHeader(String name, Object value)
headers()
instead.@Deprecated void setHeader(String name, Object value)
headers()
instead.@Deprecated void setHeader(String name, Iterable<?> values)
headers()
instead.@Deprecated void removeHeader(String name)
headers()
instead.@Deprecated void clearHeaders()
headers()
instead.boolean isChunked()
true
if and only if this message does not have any
content but the HttpChunk
s, which is generated by
HttpMessageDecoder
consecutively, contain the actual content.
Please note that this method will keep returning true
if the
"Transfer-Encoding"
of this message is "chunked"
, even if
you attempt to override this property by calling setChunked(boolean)
with false
.
void setChunked(boolean chunked)
HttpChunk
s, which is generated by HttpMessageDecoder
consecutively, contain the actual content.
If this method is called with true
, the content of this message
becomes ChannelBuffers.EMPTY_BUFFER
.
Even if this method is called with false
, isChunked()
will keep returning true
if the "Transfer-Encoding"
of
this message is "chunked"
.
Copyright © 2008-2015 The Netty Project. All Rights Reserved.