软件包 | 描述 |
---|---|
io.netty.handler.codec.http2 |
用于发送和接收HTTP / 2帧的处理程序。
|
Modifier and Type | Class and Description |
---|---|
class |
DefaultHttp2Headers |
class |
EmptyHttp2Headers |
class |
ReadOnlyHttp2Headers
Http2Headers 的变体,它只支持只读方法。
|
Modifier and Type | Method and Description |
---|---|
Http2Headers |
ReadOnlyHttp2Headers.add(java.lang.CharSequence name, java.lang.CharSequence... values) |
Http2Headers |
ReadOnlyHttp2Headers.add(java.lang.CharSequence name, java.lang.CharSequence value) |
Http2Headers |
ReadOnlyHttp2Headers.add(java.lang.CharSequence name, java.lang.Iterable<? extends java.lang.CharSequence> values) |
Http2Headers |
ReadOnlyHttp2Headers.add(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers) |
Http2Headers |
ReadOnlyHttp2Headers.addBoolean(java.lang.CharSequence name, boolean value) |
Http2Headers |
ReadOnlyHttp2Headers.addByte(java.lang.CharSequence name, byte value) |
Http2Headers |
ReadOnlyHttp2Headers.addChar(java.lang.CharSequence name, char value) |
Http2Headers |
ReadOnlyHttp2Headers.addDouble(java.lang.CharSequence name, double value) |
Http2Headers |
ReadOnlyHttp2Headers.addFloat(java.lang.CharSequence name, float value) |
Http2Headers |
ReadOnlyHttp2Headers.addInt(java.lang.CharSequence name, int value) |
Http2Headers |
ReadOnlyHttp2Headers.addLong(java.lang.CharSequence name, long value) |
Http2Headers |
ReadOnlyHttp2Headers.addObject(java.lang.CharSequence name, java.lang.Iterable<?> values) |
Http2Headers |
ReadOnlyHttp2Headers.addObject(java.lang.CharSequence name, java.lang.Object... values) |
Http2Headers |
ReadOnlyHttp2Headers.addObject(java.lang.CharSequence name, java.lang.Object value) |
Http2Headers |
ReadOnlyHttp2Headers.addShort(java.lang.CharSequence name, short value) |
Http2Headers |
ReadOnlyHttp2Headers.addTimeMillis(java.lang.CharSequence name, long value) |
Http2Headers |
ReadOnlyHttp2Headers.authority(java.lang.CharSequence value) |
Http2Headers |
Http2Headers.authority(java.lang.CharSequence value)
如果没有这样的标题,则设置
Http2Headers.PseudoHeaderName.AUTHORITY 标题或
null
|
Http2Headers |
DefaultHttp2Headers.authority(java.lang.CharSequence value) |
Http2Headers |
ReadOnlyHttp2Headers.clear() |
Http2Headers |
DefaultHttp2Headers.clear() |
Http2Headers |
Http2HeadersDecoder.decodeHeaders(int streamId, ByteBuf headerBlock)
解码给定的标题块并返回标题。
|
Http2Headers |
DefaultHttp2HeadersDecoder.decodeHeaders(int streamId, ByteBuf headerBlock) |
Http2Headers |
Http2HeadersFrame.headers()
一个完整的标题列表。
|
Http2Headers |
DefaultHttp2HeadersFrame.headers() |
Http2Headers |
ReadOnlyHttp2Headers.method(java.lang.CharSequence value) |
Http2Headers |
Http2Headers.method(java.lang.CharSequence value)
如果没有这样的标题,则设置
Http2Headers.PseudoHeaderName.METHOD 标题或
null
|
Http2Headers |
DefaultHttp2Headers.method(java.lang.CharSequence value) |
protected Http2Headers |
DefaultHttp2HeadersDecoder.newHeaders()
创建一个新的 Http2Headers 对象,该对象将存储解码操作的结果。
|
Http2Headers |
ReadOnlyHttp2Headers.path(java.lang.CharSequence value) |
Http2Headers |
Http2Headers.path(java.lang.CharSequence value)
如果没有这样的标题,则设置
Http2Headers.PseudoHeaderName.PATH 标题或
null
|
Http2Headers |
DefaultHttp2Headers.path(java.lang.CharSequence value) |
Http2Headers |
ReadOnlyHttp2Headers.scheme(java.lang.CharSequence value) |
Http2Headers |
Http2Headers.scheme(java.lang.CharSequence value)
如果没有这样的标题,则设置
Http2Headers.PseudoHeaderName.SCHEME 标题
|
Http2Headers |
DefaultHttp2Headers.scheme(java.lang.CharSequence value) |
Http2Headers |
ReadOnlyHttp2Headers.set(java.lang.CharSequence name, java.lang.CharSequence... values) |
Http2Headers |
ReadOnlyHttp2Headers.set(java.lang.CharSequence name, java.lang.CharSequence value) |
Http2Headers |
ReadOnlyHttp2Headers.set(java.lang.CharSequence name, java.lang.Iterable<? extends java.lang.CharSequence> values) |
Http2Headers |
ReadOnlyHttp2Headers.set(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers) |
Http2Headers |
ReadOnlyHttp2Headers.setAll(Headers<? extends java.lang.CharSequence,? extends java.lang.CharSequence,?> headers) |
Http2Headers |
ReadOnlyHttp2Headers.setBoolean(java.lang.CharSequence name, boolean value) |
Http2Headers |
ReadOnlyHttp2Headers.setByte(java.lang.CharSequence name, byte value) |
Http2Headers |
ReadOnlyHttp2Headers.setChar(java.lang.CharSequence name, char value) |
Http2Headers |
ReadOnlyHttp2Headers.setDouble(java.lang.CharSequence name, double value) |
Http2Headers |
ReadOnlyHttp2Headers.setFloat(java.lang.CharSequence name, float value) |
Http2Headers |
ReadOnlyHttp2Headers.setInt(java.lang.CharSequence name, int value) |
Http2Headers |
ReadOnlyHttp2Headers.setLong(java.lang.CharSequence name, long value) |
Http2Headers |
ReadOnlyHttp2Headers.setObject(java.lang.CharSequence name, java.lang.Iterable<?> values) |
Http2Headers |
ReadOnlyHttp2Headers.setObject(java.lang.CharSequence name, java.lang.Object... values) |
Http2Headers |
ReadOnlyHttp2Headers.setObject(java.lang.CharSequence name, java.lang.Object value) |
Http2Headers |
ReadOnlyHttp2Headers.setShort(java.lang.CharSequence name, short value) |
Http2Headers |
ReadOnlyHttp2Headers.setTimeMillis(java.lang.CharSequence name, long value) |
Http2Headers |
ReadOnlyHttp2Headers.status(java.lang.CharSequence value) |
Http2Headers |
Http2Headers.status(java.lang.CharSequence value)
如果没有这样的标题,则设置
Http2Headers.PseudoHeaderName.STATUS 标题或
null
|
Http2Headers |
DefaultHttp2Headers.status(java.lang.CharSequence value) |
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders, boolean validateHeaders) |
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpMessage in, boolean validateHeaders)
将给定的HTTP / 1.x标头转换为HTTP / 2标头。
|
Modifier and Type | Method and Description |
---|---|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId, Http2Headers sourceHeaders, FullHttpMessage destinationMessage, boolean addToTrailer)
将HTTP / 2标头翻译并添加到HTTP / 1.x标头。
|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId, Http2Headers inputHeaders, HttpHeaders outputHeaders, HttpVersion httpVersion, boolean isTrailer, boolean isRequest)
将HTTP / 2标头翻译并添加到HTTP / 1.x标头。
|
void |
Http2HeadersEncoder.encodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer)
编码给定的标题并将输出标题块写入给定的输出缓冲区。
|
void |
DefaultHttp2HeadersEncoder.encodeHeaders(int streamId, Http2Headers headers, ByteBuf buffer) |
boolean |
Http2PromisedRequestVerifier.isAuthoritative(ChannelHandlerContext ctx, Http2Headers headers)
确定 Http2Headers 对于特定的ChannelHandlerContext 是否具有权威性 。
|
boolean |
Http2PromisedRequestVerifier.isCacheable(Http2Headers headers)
确定请求是否可缓存。
|
boolean |
Http2PromisedRequestVerifier.isSafe(Http2Headers headers)
确定请求是否安全。
|
void |
Http2FrameLogger.logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) |
void |
Http2FrameLogger.logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) |
void |
Http2FrameLogger.logPushPromise(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.newMessage(Http2Stream stream, Http2Headers headers, boolean validateHttpHeaders, ByteBufAllocator alloc)
根据当前连接参数创建一个新的 FullHttpMessage
|
void |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endOfStream) |
void |
Http2FrameListenerDecorator.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) |
void |
Http2FrameListener.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endOfStream)
处理入站
HEADERS 框架。
|
void |
Http2FrameAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) |
void |
Http2EventAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) |
void |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream) |
void |
InboundHttp2ToHttpAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endOfStream) |
void |
Http2FrameListenerDecorator.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) |
void |
Http2FrameListener.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endOfStream)
处理带有指定优先级信息的入站
HEADERS 帧。
|
void |
Http2FrameAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) |
void |
Http2EventAdapter.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) |
void |
DelegatingDecompressorFrameListener.onHeadersRead(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) |
void |
InboundHttp2ToHttpAdapter.onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) |
void |
Http2FrameListenerDecorator.onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) |
void |
Http2FrameListener.onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding)
处理入站
PUSH_PROMISE 框架。
|
void |
Http2FrameAdapter.onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) |
void |
Http2EventAdapter.onPushPromiseRead(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding) |
protected FullHttpMessage |
InboundHttp2ToHttpAdapter.processHeadersBegin(ChannelHandlerContext ctx, Http2Stream stream, Http2Headers headers, boolean endOfStream, boolean allowAppend, boolean appendToTrailer)
提供HTTP / 2和HTTP头对象之间的转换,同时确保流处于额外头的有效状态。
|
static FullHttpRequest |
HttpConversionUtil.toFullHttpRequest(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc, boolean validateHttpHeaders)
创建一个新的对象来包含请求数据
|
static FullHttpResponse |
HttpConversionUtil.toFullHttpResponse(int streamId, Http2Headers http2Headers, ByteBufAllocator alloc, boolean validateHttpHeaders)
创建一个新的对象来包含响应数据
|
static void |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders, Http2Headers out) |
static HttpRequest |
HttpConversionUtil.toHttpRequest(int streamId, Http2Headers http2Headers, boolean validateHttpHeaders)
创建一个新的对象来包含请求数据。
|
static HttpResponse |
HttpConversionUtil.toHttpResponse(int streamId, Http2Headers http2Headers, boolean validateHttpHeaders)
创建一个新的对象来包含响应数据。
|
ChannelFuture |
StreamBufferingEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
Http2OutboundFrameLogger.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
Http2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise)
将HEADERS帧写入远程端点。
|
ChannelFuture |
DefaultHttp2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
DefaultHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
DecoratingHttp2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
CompressorHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
StreamBufferingEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endOfStream, ChannelPromise promise) |
ChannelFuture |
Http2OutboundFrameLogger.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
Http2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream, ChannelPromise promise)
将指定优先级的HEADERS帧写入远程端点。
|
ChannelFuture |
DefaultHttp2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
DefaultHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endOfStream, ChannelPromise promise) |
ChannelFuture |
DecoratingHttp2FrameWriter.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream, ChannelPromise promise) |
ChannelFuture |
CompressorHttp2ConnectionEncoder.writeHeaders(ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endOfStream, ChannelPromise promise) |
ChannelFuture |
Http2OutboundFrameLogger.writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) |
ChannelFuture |
Http2FrameWriter.writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise)
将PUSH_PROMISE帧写入远程端点。
|
ChannelFuture |
DefaultHttp2FrameWriter.writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) |
ChannelFuture |
DefaultHttp2ConnectionEncoder.writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) |
ChannelFuture |
DecoratingHttp2FrameWriter.writePushPromise(ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding, ChannelPromise promise) |
Constructor and Description |
---|
DefaultHttp2HeadersFrame(Http2Headers headers)
相当于
new DefaultHttp2HeadersFrame(headers, false) 。
|
DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream)
相当于
new DefaultHttp2HeadersFrame(headers, endStream, 0) 。
|
DefaultHttp2HeadersFrame(Http2Headers headers, boolean endStream, int padding)
构造一个新的标题消息。
|
Copyright © 2008–2018 The Netty Project. All rights reserved.