Package | Description |
---|---|
io.netty.handler.codec.http |
Encoder, decoder and their related message types for HTTP.
|
io.netty.handler.codec.http2 |
Handlers for sending and receiving HTTP/2 frames.
|
io.netty.handler.codec.rtsp |
An RTSP
extension based on the HTTP codec.
|
io.netty.handler.codec.spdy |
Encoder, decoder, session handler and their related message types for the SPDY protocol.
|
Modifier and Type | Class and Description |
---|---|
class |
HttpObjectEncoder<H extends HttpMessage>
|
Modifier and Type | Interface and Description |
---|---|
interface |
FullHttpMessage
Combines
HttpMessage and LastHttpContent into one
message. |
interface |
FullHttpRequest
Combine the
HttpRequest and FullHttpMessage , so the request is a complete HTTP
request. |
interface |
FullHttpResponse
Combination of a
HttpResponse and FullHttpMessage . |
interface |
HttpRequest
An HTTP request.
|
interface |
HttpResponse
An HTTP response.
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultFullHttpRequest
Default implementation of
FullHttpRequest . |
class |
DefaultFullHttpResponse
Default implementation of a
FullHttpResponse . |
class |
DefaultHttpMessage
The default
HttpMessage implementation. |
class |
DefaultHttpRequest
The default
HttpRequest implementation. |
class |
DefaultHttpResponse
The default
HttpResponse implementation. |
Modifier and Type | Method and Description |
---|---|
protected HttpMessage |
HttpRequestDecoder.createInvalidMessage() |
protected abstract HttpMessage |
HttpObjectDecoder.createInvalidMessage() |
protected HttpMessage |
HttpResponseDecoder.createInvalidMessage() |
protected HttpMessage |
HttpRequestDecoder.createMessage(String[] initialLine) |
protected abstract HttpMessage |
HttpObjectDecoder.createMessage(String[] initialLine) |
protected HttpMessage |
HttpResponseDecoder.createMessage(String[] initialLine) |
HttpMessage |
HttpMessage.setProtocolVersion(HttpVersion version)
Set the protocol version of this
HttpMessage |
HttpMessage |
DefaultHttpMessage.setProtocolVersion(HttpVersion version) |
Modifier and Type | Method and Description |
---|---|
static void |
HttpHeaders.addDateHeader(HttpMessage message,
CharSequence name,
Date value)
Deprecated.
Use
HttpHeaders.add(CharSequence, Object) instead.
Adds a new date header with the specified name and value. The specified
value is formatted as defined in
RFC2616 |
static void |
HttpHeaders.addDateHeader(HttpMessage message,
String name,
Date value)
Deprecated.
Use
HttpHeaders.add(CharSequence, Object) instead. |
static void |
HttpHeaders.addHeader(HttpMessage message,
CharSequence name,
Object value)
Deprecated.
Use
HttpHeaders.add(CharSequence, Object) instead.
Adds a new header with the specified name and value.
If the specified value is not a String , it is converted into a
String by Object.toString() , except for Date
and Calendar which are formatted to the date format defined in
RFC2616. |
static void |
HttpHeaders.addHeader(HttpMessage message,
String name,
Object value)
Deprecated.
Use
HttpHeaders.add(CharSequence, Object) instead. |
static void |
HttpHeaders.addIntHeader(HttpMessage message,
CharSequence name,
int value)
Deprecated.
Use
HttpHeaders.addInt(CharSequence, int) instead.
Adds a new integer header with the specified name and value. |
static void |
HttpHeaders.addIntHeader(HttpMessage message,
String name,
int value)
Deprecated.
Use
HttpHeaders.add(CharSequence, Iterable) instead. |
protected FullHttpMessage |
HttpObjectAggregator.beginAggregation(HttpMessage start,
ByteBuf content) |
static void |
HttpHeaders.clearHeaders(HttpMessage message)
Deprecated.
Use
HttpHeaders.clear() instead.
Removes all headers from the specified message. |
static Charset |
HttpUtil.getCharset(HttpMessage message)
Fetch charset from message's Content-Type header.
|
static Charset |
HttpUtil.getCharset(HttpMessage message,
Charset defaultCharset)
Fetch charset from message's Content-Type header.
|
static CharSequence |
HttpUtil.getCharsetAsSequence(HttpMessage message)
Fetch charset from message's Content-Type header as a char sequence.
|
static CharSequence |
HttpUtil.getCharsetAsString(HttpMessage message)
Deprecated.
|
static long |
HttpUtil.getContentLength(HttpMessage message)
Returns the length of the content.
|
static long |
HttpHeaders.getContentLength(HttpMessage message)
Deprecated.
Use
HttpUtil.getContentLength(HttpMessage) instead.
Returns the length of the content. Please note that this value is
not retrieved from ByteBufHolder.content() but from the
"Content-Length" header, and thus they are independent from each
other. |
static int |
HttpUtil.getContentLength(HttpMessage message,
int defaultValue)
Get an
int representation of HttpUtil.getContentLength(HttpMessage, long) . |
static long |
HttpUtil.getContentLength(HttpMessage message,
long defaultValue)
Returns the length of the content or the specified default value if the message does not have the
"Content-Length" header . |
static long |
HttpHeaders.getContentLength(HttpMessage message,
long defaultValue)
Deprecated.
Use
HttpUtil.getContentLength(HttpMessage, long) instead.
Returns the length of the content. Please note that this value is
not retrieved from ByteBufHolder.content() but from the
"Content-Length" header, and thus they are independent from each
other. |
static Date |
HttpHeaders.getDate(HttpMessage message)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence) instead.
Returns the value of the "Date" header. |
static Date |
HttpHeaders.getDate(HttpMessage message,
Date defaultValue)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead.
Returns the value of the "Date" header. If there is no such
header or the header is not a formatted date, the defaultValue
is returned. |
static Date |
HttpHeaders.getDateHeader(HttpMessage message,
CharSequence name)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence) instead.
Returns the date header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static Date |
HttpHeaders.getDateHeader(HttpMessage message,
CharSequence name,
Date defaultValue)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead.
Returns the date header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static Date |
HttpHeaders.getDateHeader(HttpMessage message,
String name)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence) instead. |
static Date |
HttpHeaders.getDateHeader(HttpMessage message,
String name,
Date defaultValue)
Deprecated.
Use
HttpHeaders.getTimeMillis(CharSequence, long) instead. |
static String |
HttpHeaders.getHeader(HttpMessage message,
CharSequence name)
Deprecated.
Use
HttpHeaders.get(CharSequence) instead.
Returns the header value with the specified header name. If there are
more than one header value for the specified header name, the first
value is returned. |
static String |
HttpHeaders.getHeader(HttpMessage message,
CharSequence name,
String defaultValue)
Deprecated.
Use
HttpHeaders.get(CharSequence, String) instead.
Returns the header value with the specified header name. If there are
more than one header value for the specified header name, the first
value is returned. |
static String |
HttpHeaders.getHeader(HttpMessage message,
String name)
Deprecated.
Use
HttpHeaders.get(CharSequence) instead. |
static String |
HttpHeaders.getHeader(HttpMessage message,
String name,
String defaultValue)
Deprecated.
Use
HttpHeaders.get(CharSequence, String) instead. |
static String |
HttpHeaders.getHost(HttpMessage message)
Deprecated.
Use
HttpHeaders.get(CharSequence) instead.
Returns the value of the "Host" header. |
static String |
HttpHeaders.getHost(HttpMessage message,
String defaultValue)
Deprecated.
Use
HttpHeaders.get(CharSequence, String) instead.
Returns the value of the "Host" header. If there is no such
header, the defaultValue is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
CharSequence name)
Deprecated.
Use
HttpHeaders.getInt(CharSequence) instead.
Returns the integer header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
CharSequence name,
int defaultValue)
Deprecated.
Use
HttpHeaders.getInt(CharSequence, int) instead.
Returns the integer header value with the specified header name. If
there are more than one header value for the specified header name, the
first value is returned. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
String name)
Deprecated.
Use
HttpHeaders.getInt(CharSequence) instead. |
static int |
HttpHeaders.getIntHeader(HttpMessage message,
String name,
int defaultValue)
Deprecated.
Use
HttpHeaders.getInt(CharSequence, int) instead. |
static CharSequence |
HttpUtil.getMimeType(HttpMessage message)
Fetch MIME type part from message's Content-Type header as a char sequence.
|
protected void |
HttpObjectAggregator.handleOversizedMessage(ChannelHandlerContext ctx,
HttpMessage oversized) |
protected void |
HttpObjectDecoder.handleTransferEncodingChunkedWithContentLength(HttpMessage message)
Invoked when a message with both a "Transfer-Encoding: chunked" and a "Content-Length" header field is detected.
|
static boolean |
HttpUtil.is100ContinueExpected(HttpMessage message)
Returns
true if and only if the specified message contains an expect header and the only expectation
present is the 100-continue expectation. |
static boolean |
HttpHeaders.is100ContinueExpected(HttpMessage message)
Deprecated.
Use
HttpUtil.is100ContinueExpected(HttpMessage) instead.
Returns true if and only if the specified message contains the
"Expect: 100-continue" header. |
protected boolean |
HttpRequestDecoder.isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
HttpObjectDecoder.isContentAlwaysEmpty(HttpMessage msg) |
protected boolean |
HttpObjectAggregator.isContentLengthInvalid(HttpMessage start,
int maxContentLength) |
static boolean |
HttpUtil.isContentLengthSet(HttpMessage m) |
static boolean |
HttpHeaders.isContentLengthSet(HttpMessage m)
Deprecated.
Use
HttpUtil.isContentLengthSet(HttpMessage) instead. |
static boolean |
HttpUtil.isKeepAlive(HttpMessage message)
Returns
true if and only if the connection can remain open and
thus 'kept alive'. |
static boolean |
HttpHeaders.isKeepAlive(HttpMessage message)
Deprecated.
Use
HttpUtil.isKeepAlive(HttpMessage) instead.
Returns true if and only if the connection can remain open and
thus 'kept alive'. This methods respects the value of the
"Connection" header first and then the return value of
HttpVersion.isKeepAliveDefault() . |
static boolean |
HttpUtil.isTransferEncodingChunked(HttpMessage message)
Checks to see if the transfer encoding in a specified
HttpMessage is chunked |
static boolean |
HttpHeaders.isTransferEncodingChunked(HttpMessage message)
Deprecated.
Use
HttpUtil.isTransferEncodingChunked(HttpMessage) instead.
Checks to see if the transfer encoding in a specified HttpMessage is chunked |
protected Object |
HttpObjectAggregator.newContinueResponse(HttpMessage start,
int maxContentLength,
ChannelPipeline pipeline) |
static void |
HttpHeaders.removeHeader(HttpMessage message,
CharSequence name)
Deprecated.
Use
HttpHeaders.remove(CharSequence) instead.
Removes the header with the specified name. |
static void |
HttpHeaders.removeHeader(HttpMessage message,
String name)
Deprecated.
Use
HttpHeaders.remove(CharSequence) instead. |
static void |
HttpHeaders.removeTransferEncodingChunked(HttpMessage m)
Deprecated.
|
static void |
HttpHeaders.set100ContinueExpected(HttpMessage message)
Deprecated.
Use
HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
Sets the "Expect: 100-continue" header to the specified message.
If there is any existing "Expect" header, they are replaced with
the new one. |
static void |
HttpUtil.set100ContinueExpected(HttpMessage message,
boolean expected)
Sets or removes the
"Expect: 100-continue" header to / from the
specified message. |
static void |
HttpHeaders.set100ContinueExpected(HttpMessage message,
boolean set)
Deprecated.
Use
HttpUtil.set100ContinueExpected(HttpMessage, boolean) instead.
Sets or removes the "Expect: 100-continue" header to / from the
specified message. If set is true ,
the "Expect: 100-continue" header is set and all other previous
"Expect" headers are removed. Otherwise, all "Expect"
headers are removed completely. |
static void |
HttpUtil.setContentLength(HttpMessage message,
long length)
Sets the
"Content-Length" header. |
static void |
HttpHeaders.setContentLength(HttpMessage message,
long length)
Deprecated.
Use
HttpUtil.setContentLength(HttpMessage, long) instead. |
static void |
HttpHeaders.setDate(HttpMessage message,
Date value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets the "Date" header. |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
CharSequence name,
Date value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets a new date header with the specified name and value. If there
is an existing header with the same name, the existing header is removed.
The specified value is formatted as defined in
RFC2616 |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
CharSequence name,
Iterable<Date> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new date header with the specified name and values. If there
is an existing header with the same name, the existing header is removed.
The specified values are formatted as defined in
RFC2616 |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
String name,
Date value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setDateHeader(HttpMessage message,
String name,
Iterable<Date> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpHeaders.setHeader(HttpMessage message,
CharSequence name,
Iterable<?> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new header with the specified name and values. If there is an
existing header with the same name, the existing header is removed.
This getMethod can be represented approximately as the following code:
removeHeader(message, name); for (Object v: values) { if (v == null) { break; } addHeader(message, name, v); } |
static void |
HttpHeaders.setHeader(HttpMessage message,
CharSequence name,
Object value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets a new header with the specified name and value. If there is an
existing header with the same name, the existing header is removed.
If the specified value is not a String , it is converted into a
String by Object.toString() , except for Date
and Calendar which are formatted to the date format defined in
RFC2616. |
static void |
HttpHeaders.setHeader(HttpMessage message,
String name,
Iterable<?> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpHeaders.setHeader(HttpMessage message,
String name,
Object value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setHost(HttpMessage message,
CharSequence value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead.
Sets the "Host" header. |
static void |
HttpHeaders.setHost(HttpMessage message,
String value)
Deprecated.
Use
HttpHeaders.set(CharSequence, Object) instead. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
CharSequence name,
int value)
Deprecated.
Use
HttpHeaders.setInt(CharSequence, int) instead.
Sets a new integer header with the specified name and value. If there
is an existing header with the same name, the existing header is removed. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
CharSequence name,
Iterable<Integer> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead.
Sets a new integer header with the specified name and values. If there
is an existing header with the same name, the existing header is removed. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
String name,
int value)
Deprecated.
Use
HttpHeaders.setInt(CharSequence, int) instead. |
static void |
HttpHeaders.setIntHeader(HttpMessage message,
String name,
Iterable<Integer> values)
Deprecated.
Use
HttpHeaders.set(CharSequence, Iterable) instead. |
static void |
HttpUtil.setKeepAlive(HttpMessage message,
boolean keepAlive)
Sets the value of the
"Connection" header depending on the
protocol version of the specified message. |
static void |
HttpHeaders.setKeepAlive(HttpMessage message,
boolean keepAlive)
Deprecated.
Use
HttpUtil.setKeepAlive(HttpMessage, boolean) instead.
Sets the value of the "Connection" header depending on the
protocol version of the specified message. This getMethod sets or removes
the "Connection" header depending on what the default keep alive
mode of the message's protocol version is, as specified by
HttpVersion.isKeepAliveDefault() .
|
static void |
HttpHeaders.setTransferEncodingChunked(HttpMessage m)
Deprecated.
|
static void |
HttpUtil.setTransferEncodingChunked(HttpMessage m,
boolean chunked)
Set the
HttpHeaderNames.TRANSFER_ENCODING to either include HttpHeaderValues.CHUNKED if
chunked is true , or remove HttpHeaderValues.CHUNKED if chunked is false . |
Modifier and Type | Method and Description |
---|---|
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpMessage in,
boolean validateHeaders)
Converts the given HTTP/1.x headers into HTTP/2 headers.
|
Modifier and Type | Class and Description |
---|---|
class |
RtspObjectEncoder<H extends HttpMessage>
Deprecated.
Use
RtspEncoder instead. |
Modifier and Type | Method and Description |
---|---|
protected HttpMessage |
RtspDecoder.createInvalidMessage() |
protected HttpMessage |
RtspDecoder.createMessage(String[] initialLine) |
Modifier and Type | Method and Description |
---|---|
protected void |
RtspEncoder.encodeInitialLine(ByteBuf buf,
HttpMessage message) |
protected boolean |
RtspObjectDecoder.isContentAlwaysEmpty(HttpMessage msg)
Deprecated.
|
protected boolean |
RtspDecoder.isContentAlwaysEmpty(HttpMessage msg) |
Modifier and Type | Method and Description |
---|---|
protected void |
SpdyHttpResponseStreamIdHandler.encode(ChannelHandlerContext ctx,
HttpMessage msg,
List<Object> out) |
Copyright © 2008–2024 The Netty Project. All rights reserved.