软件包 | 描述 |
---|---|
io.netty.handler.codec.http |
编码器,解码器及其相关的HTTP消息类型。
|
io.netty.handler.codec.http.cors |
该软件包包含跨源资源共享(CORS)相关类。
|
io.netty.handler.codec.http.websocketx |
Web Socket数据帧的编码器,解码器,握手及其相关消息类型。
|
io.netty.handler.codec.http2 |
用于发送和接收HTTP / 2帧的处理程序。
|
io.netty.handler.proxy |
通过代理协议(如
SOCKS和
HTTP CONNECT tunneling)添加对客户端连接的支持
|
Modifier and Type | Class and Description |
---|---|
class |
CombinedHttpHeaders
将使用逗号分隔的值列表为单个标题添加相同标题的多个值。
|
class |
DefaultHttpHeaders
默认实现 HttpHeaders 。
|
class |
EmptyHttpHeaders |
class |
ReadOnlyHttpHeaders
HttpHeaders 的变体,它只支持只读方法。
|
Modifier and Type | Field and Description |
---|---|
static HttpHeaders |
HttpHeaders.EMPTY_HEADERS
已过时。
使用
EmptyHttpHeaders.INSTANCE 。
该实例在此处被实例化以破坏 |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpHeaders.add(java.lang.CharSequence name, java.lang.Iterable<?> values)
添加具有指定名称和值的新标题。
|
HttpHeaders |
DefaultHttpHeaders.add(java.lang.CharSequence name, java.lang.Iterable<?> values) |
HttpHeaders |
HttpHeaders.add(java.lang.CharSequence name, java.lang.Object value)
添加具有指定名称和值的新标题。
|
HttpHeaders |
DefaultHttpHeaders.add(java.lang.CharSequence name, java.lang.Object value) |
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
添加指定
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)
将
name 添加到
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)
将
name 添加到
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()
删除此 HttpMessage 的所有标头。
|
HttpHeaders |
EmptyHttpHeaders.clear() |
HttpHeaders |
DefaultHttpHeaders.clear() |
HttpHeaders |
HttpHeaders.copy()
返回传入的DEAP副本 HttpHeaders 。
|
HttpHeaders |
DefaultHttpHeaders.copy() |
HttpHeaders |
HttpMessage.headers()
返回此消息的标题。
|
HttpHeaders |
DefaultHttpMessage.headers() |
HttpHeaders |
HttpHeaders.remove(java.lang.CharSequence 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)
使用指定的名称和值设置标题。
|
HttpHeaders |
DefaultHttpHeaders.set(java.lang.CharSequence name, java.lang.Iterable<?> values) |
HttpHeaders |
HttpHeaders.set(java.lang.CharSequence name, java.lang.Object value)
设置具有指定名称和值的标题。
|
HttpHeaders |
DefaultHttpHeaders.set(java.lang.CharSequence name, java.lang.Object value) |
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
清除当前标题条目并复制指定的
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)
保留所有当前的信息,但是电话
set(String, Object) 在每个条目
headers
|
HttpHeaders |
ReadOnlyHttpHeaders.setInt(java.lang.CharSequence name, int value) |
abstract HttpHeaders |
HttpHeaders.setInt(java.lang.CharSequence name, int value)
将
name 设置为
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)
将
name 设置为
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() |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
添加指定
headers 所有标题条目。
|
HttpHeaders |
DefaultHttpHeaders.add(HttpHeaders headers) |
protected void |
HttpObjectEncoder.encodeHeaders(HttpHeaders headers, ByteBuf buf)
将 HttpHeaders 编码为ByteBuf 。
|
boolean |
HttpServerUpgradeHandler.UpgradeCodec.prepareUpgradeResponse(ChannelHandlerContext ctx, FullHttpRequest upgradeRequest, HttpHeaders upgradeHeaders)
备
upgradeHeaders 为基于内容的协议更新
upgradeRequest 。
|
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
清除当前标题条目并复制指定的
headers 所有标题条目。
|
HttpHeaders |
DefaultHttpHeaders.set(HttpHeaders headers) |
HttpHeaders |
HttpHeaders.setAll(HttpHeaders headers)
保留所有当前的信息,但是电话
set(String, Object) 在每个条目
headers
|
static void |
HttpUtil.setKeepAlive(HttpHeaders h, HttpVersion httpVersion, boolean keepAlive)
根据指定消息的协议版本设置
"Connection" 标头的值。
|
Constructor and Description |
---|
DefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeader) |
DefaultFullHttpResponse(HttpVersion version, HttpResponseStatus status, ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeaders) |
DefaultHttpMessage(HttpVersion version, HttpHeaders headers)
创建一个新的实例。
|
DefaultHttpRequest(HttpVersion httpVersion, HttpMethod method, java.lang.String uri, HttpHeaders headers)
创建一个新的实例。
|
DefaultHttpResponse(HttpVersion version, HttpResponseStatus status, HttpHeaders headers)
创建一个新的实例。
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
CorsConfig.preflightResponseHeaders()
返回应该添加到CORS预检响应中的HTTP响应标头。
|
Modifier and Type | Field and Description |
---|---|
protected HttpHeaders |
WebSocketClientHandshaker.customHeaders |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
WebSocketServerProtocolHandler.HandshakeComplete.requestHeaders() |
Modifier and Type | Method and Description |
---|---|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel, FullHttpRequest req, HttpHeaders responseHeaders, ChannelPromise promise)
执行打开握手当调用此方法必须不保留 FullHttpRequest 这是在过去。
|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel, HttpRequest req, HttpHeaders responseHeaders, ChannelPromise promise)
执行打开握手当调用此方法必须不保留 HttpRequest 这是在过去。
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders)
创建一个新的握手。
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
创建一个新的握手。
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch)
创建一个新的握手。
|
protected FullHttpResponse |
WebSocketServerHandshaker13.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers)
处理Web套接字规范
HyBi versions 13-17的Web套接字握手。
|
protected FullHttpResponse |
WebSocketServerHandshaker08.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers)
处理Web套接字规范
HyBi version 8 to 10的Web套接字握手。
|
protected FullHttpResponse |
WebSocketServerHandshaker07.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers)
处理Web套接字规范
HyBi version 7的Web套接字握手。
|
protected FullHttpResponse |
WebSocketServerHandshaker00.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers)
处理Web套接字规范
HyBi version 0及更低版本的Web套接字握手。
|
protected abstract FullHttpResponse |
WebSocketServerHandshaker.newHandshakeResponse(FullHttpRequest req, HttpHeaders responseHeaders)
返回将用于响应握手请求的新{@link FullHttpResponse)。
|
Constructor and Description |
---|
WebSocketClientHandshaker(java.net.URI uri, WebSocketVersion version, java.lang.String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength)
基础构造函数
|
WebSocketClientHandshaker00(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength)
构造函数指定要启动的目标Web套接字位置和版本
|
WebSocketClientHandshaker07(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
创建一个新的实例。
|
WebSocketClientHandshaker07(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch)
创建一个新的实例。
|
WebSocketClientHandshaker08(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
创建一个新的实例。
|
WebSocketClientHandshaker08(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch)
创建一个新的实例。
|
WebSocketClientHandshaker13(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
创建一个新的实例。
|
WebSocketClientHandshaker13(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch)
创建一个新的实例。
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength)
基础构造函数
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames)
基础构造函数
|
WebSocketClientProtocolHandler(java.net.URI webSocketURL, WebSocketVersion version, java.lang.String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames, boolean performMasking, boolean allowMaskMismatch)
基础构造函数
|
Modifier and Type | Method and Description |
---|---|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest)
将HTTP / 2标头翻译并添加到HTTP / 1.x标头。
|
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) |
Constructor and Description |
---|
HttpProxyHandler(java.net.SocketAddress proxyAddress, HttpHeaders headers) |
HttpProxyHandler(java.net.SocketAddress proxyAddress, java.lang.String username, java.lang.String password, HttpHeaders headers) |
Copyright © 2008–2018 The Netty Project. All rights reserved.