程序包 | 说明 |
---|---|
io.netty.handler.codec.http |
Benchmarks for
io.netty.handler.codec.http . |
io.netty.handler.codec.http.cors |
This package contains Cross Origin Resource Sharing (CORS) related classes.
|
io.netty.handler.codec.http.websocketx |
Encoder, decoder, handshakers and their related message types for
Web Socket data frames.
|
io.netty.handler.codec.http2 |
Benchmarks for
io.netty.handler.codec.http2 . |
io.netty.handler.proxy |
Adds support for client connections via proxy protocols such as
SOCKS and
HTTP CONNECT tunneling
|
限定符和类型 | 类和说明 |
---|---|
class |
CombinedHttpHeaders
Will add multiple values for the same header as single header with a comma separated list of values.
|
class |
DefaultHttpHeaders
Default implementation of
HttpHeaders . |
class |
EmptyHttpHeaders |
class |
ReadOnlyHttpHeaders
A variant of
HttpHeaders which only supports read-only methods. |
限定符和类型 | 字段和说明 |
---|---|
static HttpHeaders |
HttpHeaders.EMPTY_HEADERS
已过时。
Use
EmptyHttpHeaders.INSTANCE .
The instance is instantiated here to break the cyclic static initialization between |
限定符和类型 | 方法和说明 |
---|---|
HttpHeaders |
HttpHeaders.add(java.lang.CharSequence name,
java.lang.Iterable<?> values)
Adds a new header with the specified name and values.
|
HttpHeaders |
DefaultHttpHeaders.add(java.lang.CharSequence name,
java.lang.Iterable<?> values) |
HttpHeaders |
HttpHeaders.add(java.lang.CharSequence name,
java.lang.Object value)
Adds a new header with the specified name and value.
|
HttpHeaders |
DefaultHttpHeaders.add(java.lang.CharSequence name,
java.lang.Object value) |
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
Adds all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.add(HttpHeaders headers) |
HttpHeaders |
ReadOnlyHttpHeaders.add(java.lang.String name,
java.lang.Iterable<?> values) |
abstract HttpHeaders |
HttpHeaders.add(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
EmptyHttpHeaders.add(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
DefaultHttpHeaders.add(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
ReadOnlyHttpHeaders.add(java.lang.String name,
java.lang.Object value) |
abstract HttpHeaders |
HttpHeaders.add(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
EmptyHttpHeaders.add(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
DefaultHttpHeaders.add(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
ReadOnlyHttpHeaders.addInt(java.lang.CharSequence name,
int value) |
abstract HttpHeaders |
HttpHeaders.addInt(java.lang.CharSequence name,
int value)
Add the
name to value . |
HttpHeaders |
EmptyHttpHeaders.addInt(java.lang.CharSequence name,
int value) |
HttpHeaders |
DefaultHttpHeaders.addInt(java.lang.CharSequence name,
int value) |
HttpHeaders |
ReadOnlyHttpHeaders.addShort(java.lang.CharSequence name,
short value) |
abstract HttpHeaders |
HttpHeaders.addShort(java.lang.CharSequence name,
short value)
Add the
name to value . |
HttpHeaders |
EmptyHttpHeaders.addShort(java.lang.CharSequence name,
short value) |
HttpHeaders |
DefaultHttpHeaders.addShort(java.lang.CharSequence name,
short value) |
HttpHeaders |
ReadOnlyHttpHeaders.clear() |
abstract HttpHeaders |
HttpHeaders.clear()
Removes all headers from this
HttpMessage . |
HttpHeaders |
EmptyHttpHeaders.clear() |
HttpHeaders |
DefaultHttpHeaders.clear() |
HttpHeaders |
HttpHeaders.copy()
Returns a deep copy of the passed in
HttpHeaders . |
HttpHeaders |
DefaultHttpHeaders.copy() |
HttpHeaders |
HttpMessage.headers()
Returns the headers of this message.
|
HttpHeaders |
DefaultHttpMessage.headers() |
HttpHeaders |
HttpHeadersFactory.newEmptyHeaders()
Create a new
HttpHeaders instance, but sized to be as small an object as possible. |
HttpHeaders |
DefaultHttpHeadersFactory.newEmptyHeaders() |
HttpHeaders |
HttpHeadersFactory.newHeaders()
Create a new
HttpHeaders instance. |
HttpHeaders |
DefaultHttpHeadersFactory.newHeaders() |
HttpHeaders |
HttpHeaders.remove(java.lang.CharSequence name)
Removes the header with the specified name.
|
HttpHeaders |
DefaultHttpHeaders.remove(java.lang.CharSequence name) |
HttpHeaders |
ReadOnlyHttpHeaders.remove(java.lang.String name) |
abstract HttpHeaders |
HttpHeaders.remove(java.lang.String name) |
HttpHeaders |
EmptyHttpHeaders.remove(java.lang.String name) |
HttpHeaders |
DefaultHttpHeaders.remove(java.lang.String name) |
HttpHeaders |
HttpHeaders.set(java.lang.CharSequence name,
java.lang.Iterable<?> values)
Sets a header with the specified name and values.
|
HttpHeaders |
DefaultHttpHeaders.set(java.lang.CharSequence name,
java.lang.Iterable<?> values) |
HttpHeaders |
HttpHeaders.set(java.lang.CharSequence name,
java.lang.Object value)
Sets a header with the specified name and value.
|
HttpHeaders |
DefaultHttpHeaders.set(java.lang.CharSequence name,
java.lang.Object value) |
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.set(HttpHeaders headers) |
HttpHeaders |
ReadOnlyHttpHeaders.set(java.lang.String name,
java.lang.Iterable<?> values) |
abstract HttpHeaders |
HttpHeaders.set(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
EmptyHttpHeaders.set(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
DefaultHttpHeaders.set(java.lang.String name,
java.lang.Iterable<?> values) |
HttpHeaders |
ReadOnlyHttpHeaders.set(java.lang.String name,
java.lang.Object value) |
abstract HttpHeaders |
HttpHeaders.set(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
EmptyHttpHeaders.set(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
DefaultHttpHeaders.set(java.lang.String name,
java.lang.Object value) |
HttpHeaders |
HttpHeaders.setAll(HttpHeaders headers)
Retains all current headers but calls
set(String, Object) for each entry in headers |
HttpHeaders |
ReadOnlyHttpHeaders.setInt(java.lang.CharSequence name,
int value) |
abstract HttpHeaders |
HttpHeaders.setInt(java.lang.CharSequence name,
int value)
Set the
name to value . |
HttpHeaders |
EmptyHttpHeaders.setInt(java.lang.CharSequence name,
int value) |
HttpHeaders |
DefaultHttpHeaders.setInt(java.lang.CharSequence name,
int value) |
HttpHeaders |
ReadOnlyHttpHeaders.setShort(java.lang.CharSequence name,
short value) |
abstract HttpHeaders |
HttpHeaders.setShort(java.lang.CharSequence name,
short value)
Set the
name to value . |
HttpHeaders |
EmptyHttpHeaders.setShort(java.lang.CharSequence name,
short value) |
HttpHeaders |
DefaultHttpHeaders.setShort(java.lang.CharSequence name,
short value) |
HttpHeaders |
LastHttpContent.trailingHeaders() |
HttpHeaders |
DefaultLastHttpContent.trailingHeaders() |
HttpHeaders |
DefaultFullHttpResponse.trailingHeaders() |
HttpHeaders |
DefaultFullHttpRequest.trailingHeaders() |
限定符和类型 | 方法和说明 |
---|---|
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
Adds all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.add(HttpHeaders headers) |
protected void |
HttpObjectEncoder.encodeHeaders(HttpHeaders headers,
ByteBuf buf)
Encode the
HttpHeaders into a ByteBuf . |
boolean |
HttpServerUpgradeHandler.UpgradeCodec.prepareUpgradeResponse(ChannelHandlerContext ctx,
FullHttpRequest upgradeRequest,
HttpHeaders upgradeHeaders)
Prepares the
upgradeHeaders for a protocol update based upon the contents of upgradeRequest . |
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.set(HttpHeaders headers) |
HttpHeaders |
HttpHeaders.setAll(HttpHeaders headers)
Retains all current headers but calls
set(String, Object) for each entry in headers |
static void |
HttpUtil.setKeepAlive(HttpHeaders h,
HttpVersion httpVersion,
boolean keepAlive)
Sets the value of the
"Connection" header depending on the
protocol version of the specified message. |
构造器和说明 |
---|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
ByteBuf content,
HttpHeaders headers,
HttpHeaders trailingHeader)
Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
|
DefaultFullHttpResponse(HttpVersion version,
HttpResponseStatus status,
ByteBuf content,
HttpHeaders headers,
HttpHeaders trailingHeaders)
Create an HTTP response with the given HTTP version, status, contents, headers and trailers.
|
DefaultHttpMessage(HttpVersion version,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
java.lang.String uri,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
HttpHeaders headers)
Creates a new instance.
|
DefaultLastHttpContent(ByteBuf content,
HttpHeaders trailingHeaders)
Create a new last HTTP content message with the given contents, and trailing headers.
|
限定符和类型 | 方法和说明 |
---|---|
HttpHeaders |
CorsConfig.preflightResponseHeaders()
Returns HTTP response headers that should be added to a CORS preflight response.
|
限定符和类型 | 字段和说明 |
---|---|
protected HttpHeaders |
WebSocketClientHandshaker.customHeaders |
限定符和类型 | 方法和说明 |
---|---|
HttpHeaders |
WebSocketClientProtocolConfig.customHeaders() |
HttpHeaders |
WebSocketServerProtocolHandler.HandshakeComplete.requestHeaders() |
限定符和类型 | 方法和说明 |
---|---|
WebSocketClientProtocolConfig.Builder |
WebSocketClientProtocolConfig.Builder.customHeaders(HttpHeaders customHeaders)
Map of custom headers to add to the client request
|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
FullHttpRequest req,
HttpHeaders responseHeaders,
ChannelPromise promise)
Performs the opening handshake
When call this method you MUST NOT retain the
FullHttpRequest which is passed in. |
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
HttpRequest req,
HttpHeaders responseHeaders,
ChannelPromise promise)
Performs the opening handshake
When call this method you MUST NOT retain the
HttpRequest which is passed in. |
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl,
boolean generateOriginHeader)
Creates a new handshaker.
|
protected FullHttpResponse |
WebSocketServerHandshaker13.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi versions 13-17.
|
protected FullHttpResponse |
WebSocketServerHandshaker08.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 8 to 10.
|
protected FullHttpResponse |
WebSocketServerHandshaker07.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 7.
|
protected FullHttpResponse |
WebSocketServerHandshaker00.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 0 and lower.
|
protected abstract FullHttpResponse |
WebSocketServerHandshaker.newHandshakeResponse(FullHttpRequest req,
HttpHeaders responseHeaders)
Returns a new {@link FullHttpResponse) which will be used for as response to the handshake request.
|
构造器和说明 |
---|
HandshakeComplete(java.lang.String requestUri,
HttpHeaders requestHeaders,
java.lang.String selectedSubprotocol) |
WebSocketClientHandshaker(java.net.URI uri,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Base constructor
|
WebSocketClientHandshaker(java.net.URI uri,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis)
Base constructor
|
WebSocketClientHandshaker(java.net.URI uri,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl)
Base constructor
|
WebSocketClientHandshaker(java.net.URI uri,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl,
boolean generateOriginHeader)
Base constructor
|
WebSocketClientHandshaker00(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance with the specified destination WebSocket location and version to initiate.
|
WebSocketClientHandshaker00(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis)
Creates a new instance with the specified destination WebSocket location and version to initiate.
|
WebSocketClientHandshaker07(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker07(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker07(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientHandshaker08(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker08(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker08(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientHandshaker13(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker13(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker13(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Base constructor
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames)
Base constructor
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
boolean performMasking,
boolean allowMaskMismatch)
Base constructor
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
boolean performMasking,
boolean allowMaskMismatch,
long handshakeTimeoutMillis)
Base constructor
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
long handshakeTimeoutMillis)
Base constructor
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL,
WebSocketVersion version,
java.lang.String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long handshakeTimeoutMillis)
Base constructor
|
限定符和类型 | 方法和说明 |
---|---|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId,
Http2Headers inputHeaders,
HttpHeaders outputHeaders,
HttpVersion httpVersion,
boolean isTrailer,
boolean isRequest)
Translate and add HTTP/2 headers to HTTP/1.x headers.
|
boolean |
Http2ServerUpgradeCodec.prepareUpgradeResponse(ChannelHandlerContext ctx,
FullHttpRequest upgradeRequest,
HttpHeaders headers) |
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders,
boolean validateHeaders) |
static void |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders,
Http2Headers out) |
限定符和类型 | 方法和说明 |
---|---|
HttpHeaders |
HttpProxyHandler.HttpProxyConnectException.headers()
Returns headers, if any.
|
构造器和说明 |
---|
HttpProxyConnectException(java.lang.String message,
HttpHeaders headers) |
HttpProxyHandler(java.net.SocketAddress proxyAddress,
HttpHeaders headers) |
HttpProxyHandler(java.net.SocketAddress proxyAddress,
HttpHeaders headers,
boolean ignoreDefaultPortsInConnectHostHeader) |
HttpProxyHandler(java.net.SocketAddress proxyAddress,
java.lang.String username,
java.lang.String password,
HttpHeaders headers) |
HttpProxyHandler(java.net.SocketAddress proxyAddress,
java.lang.String username,
java.lang.String password,
HttpHeaders headers,
boolean ignoreDefaultPortsInConnectHostHeader) |