[#5088] Add annotation which marks packages/interfaces/classes as unstable
Motivation: Some codecs should be considered unstable as these are relative new. For this purpose we should introduce an annotation which these codecs should us to be marked as unstable in terms of API. Modifications: - Add UnstableApi annotation and use it on codecs that are not stable - Move http2.hpack to http2.internal.hpack as it is internal. Result: Better document unstable APIs.
This commit is contained in:
parent
b39c53ce17
commit
9229ed98e2
@ -21,6 +21,7 @@ import io.netty.util.ReferenceCounted;
|
|||||||
import io.netty.util.ResourceLeak;
|
import io.netty.util.ResourceLeak;
|
||||||
import io.netty.util.ResourceLeakDetector;
|
import io.netty.util.ResourceLeakDetector;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,6 +31,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* A skeletal implementation of {@link DnsMessage}.
|
* A skeletal implementation of {@link DnsMessage}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public abstract class AbstractDnsMessage extends AbstractReferenceCounted implements DnsMessage {
|
public abstract class AbstractDnsMessage extends AbstractReferenceCounted implements DnsMessage {
|
||||||
|
|
||||||
private static final ResourceLeakDetector<DnsMessage> leakDetector =
|
private static final ResourceLeakDetector<DnsMessage> leakDetector =
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.IDN;
|
import java.net.IDN;
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* A skeletal implementation of {@link DnsRecord}.
|
* A skeletal implementation of {@link DnsRecord}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public abstract class AbstractDnsRecord implements DnsRecord {
|
public abstract class AbstractDnsRecord implements DnsRecord {
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.channel.AddressedEnvelope;
|
import io.netty.channel.AddressedEnvelope;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
@ -23,6 +24,7 @@ import java.net.SocketAddress;
|
|||||||
/**
|
/**
|
||||||
* A {@link DnsQuery} implementation for UDP/IP.
|
* A {@link DnsQuery} implementation for UDP/IP.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DatagramDnsQuery extends DefaultDnsQuery
|
public class DatagramDnsQuery extends DefaultDnsQuery
|
||||||
implements AddressedEnvelope<DatagramDnsQuery, InetSocketAddress> {
|
implements AddressedEnvelope<DatagramDnsQuery, InetSocketAddress> {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.channel.socket.DatagramPacket;
|
import io.netty.channel.socket.DatagramPacket;
|
||||||
import io.netty.handler.codec.CorruptedFrameException;
|
import io.netty.handler.codec.CorruptedFrameException;
|
||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,6 +31,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* Decodes a {@link DatagramPacket} into a {@link DatagramDnsQuery}.
|
* Decodes a {@link DatagramPacket} into a {@link DatagramDnsQuery}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
public class DatagramDnsQueryDecoder extends MessageToMessageDecoder<DatagramPacket> {
|
public class DatagramDnsQueryDecoder extends MessageToMessageDecoder<DatagramPacket> {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.ChannelHandler;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.socket.DatagramPacket;
|
import io.netty.channel.socket.DatagramPacket;
|
||||||
import io.netty.handler.codec.MessageToMessageEncoder;
|
import io.netty.handler.codec.MessageToMessageEncoder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,6 +32,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
* Encodes a {@link DatagramDnsQuery} (or an {@link AddressedEnvelope} of {@link DnsQuery}} into a
|
* Encodes a {@link DatagramDnsQuery} (or an {@link AddressedEnvelope} of {@link DnsQuery}} into a
|
||||||
* {@link DatagramPacket}.
|
* {@link DatagramPacket}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
public class DatagramDnsQueryEncoder extends MessageToMessageEncoder<AddressedEnvelope<DnsQuery, InetSocketAddress>> {
|
public class DatagramDnsQueryEncoder extends MessageToMessageEncoder<AddressedEnvelope<DnsQuery, InetSocketAddress>> {
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.channel.AddressedEnvelope;
|
import io.netty.channel.AddressedEnvelope;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
@ -23,6 +24,7 @@ import java.net.SocketAddress;
|
|||||||
/**
|
/**
|
||||||
* A {@link DnsResponse} implementation for UDP/IP.
|
* A {@link DnsResponse} implementation for UDP/IP.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DatagramDnsResponse extends DefaultDnsResponse
|
public class DatagramDnsResponse extends DefaultDnsResponse
|
||||||
implements AddressedEnvelope<DatagramDnsResponse, InetSocketAddress> {
|
implements AddressedEnvelope<DatagramDnsResponse, InetSocketAddress> {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.channel.socket.DatagramPacket;
|
import io.netty.channel.socket.DatagramPacket;
|
||||||
import io.netty.handler.codec.CorruptedFrameException;
|
import io.netty.handler.codec.CorruptedFrameException;
|
||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -30,6 +31,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* Decodes a {@link DatagramPacket} into a {@link DatagramDnsResponse}.
|
* Decodes a {@link DatagramPacket} into a {@link DatagramDnsResponse}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
public class DatagramDnsResponseDecoder extends MessageToMessageDecoder<DatagramPacket> {
|
public class DatagramDnsResponseDecoder extends MessageToMessageDecoder<DatagramPacket> {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.ChannelHandler;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.socket.DatagramPacket;
|
import io.netty.channel.socket.DatagramPacket;
|
||||||
import io.netty.handler.codec.MessageToMessageEncoder;
|
import io.netty.handler.codec.MessageToMessageEncoder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,6 +32,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
* Encodes a {@link DatagramDnsResponse} (or an {@link AddressedEnvelope} of {@link DnsResponse}} into a
|
* Encodes a {@link DatagramDnsResponse} (or an {@link AddressedEnvelope} of {@link DnsResponse}} into a
|
||||||
* {@link DatagramPacket}.
|
* {@link DatagramPacket}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
public class DatagramDnsResponseEncoder
|
public class DatagramDnsResponseEncoder
|
||||||
extends MessageToMessageEncoder<AddressedEnvelope<DnsResponse, InetSocketAddress>> {
|
extends MessageToMessageEncoder<AddressedEnvelope<DnsResponse, InetSocketAddress>> {
|
||||||
|
@ -18,7 +18,9 @@ package io.netty.handler.codec.dns;
|
|||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsPtrRecord extends AbstractDnsRecord implements DnsPtrRecord {
|
public class DefaultDnsPtrRecord extends AbstractDnsRecord implements DnsPtrRecord {
|
||||||
|
|
||||||
private final String hostname;
|
private final String hostname;
|
||||||
@ -27,7 +29,6 @@ public class DefaultDnsPtrRecord extends AbstractDnsRecord implements DnsPtrReco
|
|||||||
* Creates a new PTR record.
|
* Creates a new PTR record.
|
||||||
*
|
*
|
||||||
* @param name the domain name
|
* @param name the domain name
|
||||||
* @param type the type of the record
|
|
||||||
* @param dnsClass the class of the record, usually one of the following:
|
* @param dnsClass the class of the record, usually one of the following:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link #CLASS_IN}</li>
|
* <li>{@link #CLASS_IN}</li>
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link DnsQuery} implementation.
|
* The default {@link DnsQuery} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsQuery extends AbstractDnsMessage implements DnsQuery {
|
public class DefaultDnsQuery extends AbstractDnsMessage implements DnsQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,10 +16,12 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link DnsQuestion} implementation.
|
* The default {@link DnsQuestion} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsQuestion extends AbstractDnsRecord implements DnsQuestion {
|
public class DefaultDnsQuestion extends AbstractDnsRecord implements DnsQuestion {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,12 +17,14 @@ package io.netty.handler.codec.dns;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@code DnsRawRecord} implementation.
|
* The default {@code DnsRawRecord} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsRawRecord extends AbstractDnsRecord implements DnsRawRecord {
|
public class DefaultDnsRawRecord extends AbstractDnsRecord implements DnsRawRecord {
|
||||||
|
|
||||||
private final ByteBuf content;
|
private final ByteBuf content;
|
||||||
|
@ -18,12 +18,14 @@ package io.netty.handler.codec.dns;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.handler.codec.CorruptedFrameException;
|
import io.netty.handler.codec.CorruptedFrameException;
|
||||||
import io.netty.util.CharsetUtil;
|
import io.netty.util.CharsetUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link DnsRecordDecoder} implementation.
|
* The default {@link DnsRecordDecoder} implementation.
|
||||||
*
|
*
|
||||||
* @see DefaultDnsRecordEncoder
|
* @see DefaultDnsRecordEncoder
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsRecordDecoder implements DnsRecordDecoder {
|
public class DefaultDnsRecordDecoder implements DnsRecordDecoder {
|
||||||
|
|
||||||
static final String ROOT = ".";
|
static final String ROOT = ".";
|
||||||
|
@ -19,6 +19,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
import io.netty.handler.codec.UnsupportedMessageTypeException;
|
import io.netty.handler.codec.UnsupportedMessageTypeException;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.handler.codec.dns.DefaultDnsRecordDecoder.ROOT;
|
import static io.netty.handler.codec.dns.DefaultDnsRecordDecoder.ROOT;
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ import static io.netty.handler.codec.dns.DefaultDnsRecordDecoder.ROOT;
|
|||||||
*
|
*
|
||||||
* @see DefaultDnsRecordDecoder
|
* @see DefaultDnsRecordDecoder
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsRecordEncoder implements DnsRecordEncoder {
|
public class DefaultDnsRecordEncoder implements DnsRecordEncoder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,11 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link DnsResponse} implementation.
|
* The default {@link DnsResponse} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultDnsResponse extends AbstractDnsMessage implements DnsResponse {
|
public class DefaultDnsResponse extends AbstractDnsMessage implements DnsResponse {
|
||||||
|
|
||||||
private boolean authoritativeAnswer;
|
private boolean authoritativeAnswer;
|
||||||
|
@ -16,10 +16,12 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.util.ReferenceCounted;
|
import io.netty.util.ReferenceCounted;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The superclass which contains core information concerning a {@link DnsQuery} and a {@link DnsResponse}.
|
* The superclass which contains core information concerning a {@link DnsQuery} and a {@link DnsResponse}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsMessage extends ReferenceCounted {
|
public interface DnsMessage extends ReferenceCounted {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,11 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DNS {@code OpCode} as defined in <a href="https://tools.ietf.org/html/rfc2929">RFC2929</a>.
|
* The DNS {@code OpCode} as defined in <a href="https://tools.ietf.org/html/rfc2929">RFC2929</a>.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DnsOpCode implements Comparable<DnsOpCode> {
|
public class DnsOpCode implements Comparable<DnsOpCode> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public interface DnsPtrRecord extends DnsRecord {
|
public interface DnsPtrRecord extends DnsRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DNS query message.
|
* A DNS query message.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsQuery extends DnsMessage {
|
public interface DnsQuery extends DnsMessage {
|
||||||
@Override
|
@Override
|
||||||
DnsQuery setId(int id);
|
DnsQuery setId(int id);
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DNS question.
|
* A DNS question.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsQuestion extends DnsRecord {
|
public interface DnsQuestion extends DnsRecord {
|
||||||
/**
|
/**
|
||||||
* An unused property. This method will always return {@code 0}.
|
* An unused property. This method will always return {@code 0}.
|
||||||
|
@ -16,10 +16,12 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBufHolder;
|
import io.netty.buffer.ByteBufHolder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic {@link DnsRecord} that contains an undecoded {@code RDATA}.
|
* A generic {@link DnsRecord} that contains an undecoded {@code RDATA}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsRawRecord extends DnsRecord, ByteBufHolder {
|
public interface DnsRawRecord extends DnsRecord, ByteBufHolder {
|
||||||
@Override
|
@Override
|
||||||
DnsRawRecord copy();
|
DnsRawRecord copy();
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DNS resource record.
|
* A DNS resource record.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsRecord {
|
public interface DnsRecord {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes a DNS record into its object representation.
|
* Decodes a DNS record into its object representation.
|
||||||
*
|
*
|
||||||
* @see DatagramDnsResponseDecoder
|
* @see DatagramDnsResponseDecoder
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsRecordDecoder {
|
public interface DnsRecordDecoder {
|
||||||
|
|
||||||
DnsRecordDecoder DEFAULT = new DefaultDnsRecordDecoder();
|
DnsRecordDecoder DEFAULT = new DefaultDnsRecordDecoder();
|
||||||
|
@ -16,12 +16,14 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes a {@link DnsRecord} into binary representation.
|
* Encodes a {@link DnsRecord} into binary representation.
|
||||||
*
|
*
|
||||||
* @see DatagramDnsQueryEncoder
|
* @see DatagramDnsQueryEncoder
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsRecordEncoder {
|
public interface DnsRecordEncoder {
|
||||||
|
|
||||||
DnsRecordEncoder DEFAULT = new DefaultDnsRecordEncoder();
|
DnsRecordEncoder DEFAULT = new DefaultDnsRecordEncoder();
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
import io.netty.util.collection.IntObjectHashMap;
|
import io.netty.util.collection.IntObjectHashMap;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -23,6 +24,7 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Represents a DNS record type.
|
* Represents a DNS record type.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DnsRecordType implements Comparable<DnsRecordType> {
|
public class DnsRecordType implements Comparable<DnsRecordType> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A DNS response message.
|
* A DNS response message.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface DnsResponse extends DnsMessage {
|
public interface DnsResponse extends DnsMessage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,11 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The DNS {@code RCODE}, as defined in <a href="https://tools.ietf.org/html/rfc2929">RFC2929</a>.
|
* The DNS {@code RCODE}, as defined in <a href="https://tools.ietf.org/html/rfc2929">RFC2929</a>.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DnsResponseCode implements Comparable<DnsResponseCode> {
|
public class DnsResponseCode implements Comparable<DnsResponseCode> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a section of a {@link DnsMessage}.
|
* Represents a section of a {@link DnsMessage}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public enum DnsSection {
|
public enum DnsSection {
|
||||||
/**
|
/**
|
||||||
* The section that contains {@link DnsQuestion}s.
|
* The section that contains {@link DnsQuestion}s.
|
||||||
|
@ -17,4 +17,7 @@
|
|||||||
/**
|
/**
|
||||||
* DNS codec.
|
* DNS codec.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
package io.netty.handler.codec.dns;
|
package io.netty.handler.codec.dns;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||||
@ -66,6 +67,7 @@ import static java.util.concurrent.TimeUnit.SECONDS;
|
|||||||
* @param <T> The type of handler created by this builder.
|
* @param <T> The type of handler created by this builder.
|
||||||
* @param <B> The concrete type of this builder.
|
* @param <B> The concrete type of this builder.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2ConnectionHandler,
|
public abstract class AbstractHttp2ConnectionHandlerBuilder<T extends Http2ConnectionHandler,
|
||||||
B extends AbstractHttp2ConnectionHandlerBuilder<T, B>> {
|
B extends AbstractHttp2ConnectionHandlerBuilder<T, B>> {
|
||||||
|
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Abstract implementation of {@link Http2StreamFrame}.
|
* Abstract implementation of {@link Http2StreamFrame}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public abstract class AbstractHttp2StreamFrame implements Http2StreamFrame {
|
public abstract class AbstractHttp2StreamFrame implements Http2StreamFrame {
|
||||||
private Object stream;
|
private Object stream;
|
||||||
|
|
||||||
|
@ -15,12 +15,14 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.handler.codec.TooLongFrameException;
|
import io.netty.handler.codec.TooLongFrameException;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A skeletal builder implementation of {@link InboundHttp2ToHttpAdapter} and its subtypes.
|
* A skeletal builder implementation of {@link InboundHttp2ToHttpAdapter} and its subtypes.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public abstract class AbstractInboundHttp2ToHttpAdapterBuilder<
|
public abstract class AbstractInboundHttp2ToHttpAdapterBuilder<
|
||||||
T extends InboundHttp2ToHttpAdapter, B extends AbstractInboundHttp2ToHttpAdapterBuilder<T, B>> {
|
T extends InboundHttp2ToHttpAdapter, B extends AbstractInboundHttp2ToHttpAdapterBuilder<T, B>> {
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import io.netty.handler.codec.ByteToMessageDecoder;
|
|||||||
import io.netty.handler.codec.compression.ZlibCodecFactory;
|
import io.netty.handler.codec.compression.ZlibCodecFactory;
|
||||||
import io.netty.handler.codec.compression.ZlibWrapper;
|
import io.netty.handler.codec.compression.ZlibWrapper;
|
||||||
import io.netty.util.concurrent.PromiseCombiner;
|
import io.netty.util.concurrent.PromiseCombiner;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
|
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
|
||||||
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
|
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
|
||||||
@ -37,6 +38,7 @@ import static io.netty.handler.codec.http.HttpHeaderValues.X_GZIP;
|
|||||||
* A decorating HTTP2 encoder that will compress data frames according to the {@code content-encoding} header for each
|
* A decorating HTTP2 encoder that will compress data frames according to the {@code content-encoding} header for each
|
||||||
* stream. The compression provided by this class will be applied to the data for the entire stream.
|
* stream. The compression provided by this class will be applied to the data for the entire stream.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionEncoder {
|
public class CompressorHttp2ConnectionEncoder extends DecoratingHttp2ConnectionEncoder {
|
||||||
public static final int DEFAULT_COMPRESSION_LEVEL = 6;
|
public static final int DEFAULT_COMPRESSION_LEVEL = 6;
|
||||||
public static final int DEFAULT_WINDOW_BITS = 15;
|
public static final int DEFAULT_WINDOW_BITS = 15;
|
||||||
|
@ -18,12 +18,14 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator around another {@link Http2ConnectionDecoder} instance.
|
* Decorator around another {@link Http2ConnectionDecoder} instance.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DecoratingHttp2ConnectionDecoder implements Http2ConnectionDecoder {
|
public class DecoratingHttp2ConnectionDecoder implements Http2ConnectionDecoder {
|
||||||
private final Http2ConnectionDecoder delegate;
|
private final Http2ConnectionDecoder delegate;
|
||||||
|
|
||||||
|
@ -14,11 +14,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A decorator around another {@link Http2ConnectionEncoder} instance.
|
* A decorator around another {@link Http2ConnectionEncoder} instance.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DecoratingHttp2ConnectionEncoder extends DecoratingHttp2FrameWriter implements Http2ConnectionEncoder {
|
public class DecoratingHttp2ConnectionEncoder extends DecoratingHttp2FrameWriter implements Http2ConnectionEncoder {
|
||||||
private final Http2ConnectionEncoder delegate;
|
private final Http2ConnectionEncoder delegate;
|
||||||
|
|
||||||
|
@ -20,10 +20,12 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator around another {@link Http2FrameWriter} instance.
|
* Decorator around another {@link Http2FrameWriter} instance.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DecoratingHttp2FrameWriter implements Http2FrameWriter {
|
public class DecoratingHttp2FrameWriter implements Http2FrameWriter {
|
||||||
private final Http2FrameWriter delegate;
|
private final Http2FrameWriter delegate;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import io.netty.util.concurrent.UnaryPromiseNotifier;
|
|||||||
import io.netty.util.internal.EmptyArrays;
|
import io.netty.util.internal.EmptyArrays;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.SystemPropertyUtil;
|
import io.netty.util.internal.SystemPropertyUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ import static java.lang.Math.max;
|
|||||||
/**
|
/**
|
||||||
* Simple implementation of {@link Http2Connection}.
|
* Simple implementation of {@link Http2Connection}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2Connection implements Http2Connection {
|
public class DefaultHttp2Connection implements Http2Connection {
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DefaultHttp2Connection.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DefaultHttp2Connection.class);
|
||||||
// Fields accessed by inner classes
|
// Fields accessed by inner classes
|
||||||
|
@ -17,6 +17,7 @@ package io.netty.handler.codec.http2;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.http2.Http2Exception.ClosedStreamCreationException;
|
import io.netty.handler.codec.http2.Http2Exception.ClosedStreamCreationException;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -41,6 +42,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
* This interface enforces inbound flow control functionality through
|
* This interface enforces inbound flow control functionality through
|
||||||
* {@link Http2LocalFlowController}
|
* {@link Http2LocalFlowController}
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2ConnectionDecoder implements Http2ConnectionDecoder {
|
public class DefaultHttp2ConnectionDecoder implements Http2ConnectionDecoder {
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DefaultHttp2ConnectionDecoder.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DefaultHttp2ConnectionDecoder.class);
|
||||||
private Http2FrameListener internalFrameListener = new PrefaceFrameListener();
|
private Http2FrameListener internalFrameListener = new PrefaceFrameListener();
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
import io.netty.channel.CoalescingBufferQueue;
|
import io.netty.channel.CoalescingBufferQueue;
|
||||||
import io.netty.handler.codec.http2.Http2Exception.ClosedStreamCreationException;
|
import io.netty.handler.codec.http2.Http2Exception.ClosedStreamCreationException;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
|
|
||||||
@ -33,6 +34,7 @@ import static java.lang.Math.min;
|
|||||||
/**
|
/**
|
||||||
* Default implementation of {@link Http2ConnectionEncoder}.
|
* Default implementation of {@link Http2ConnectionEncoder}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2ConnectionEncoder implements Http2ConnectionEncoder {
|
public class DefaultHttp2ConnectionEncoder implements Http2ConnectionEncoder {
|
||||||
private final Http2FrameWriter frameWriter;
|
private final Http2FrameWriter frameWriter;
|
||||||
private final Http2Connection connection;
|
private final Http2Connection connection;
|
||||||
|
@ -20,10 +20,12 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.netty.util.IllegalReferenceCountException;
|
import io.netty.util.IllegalReferenceCountException;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link Http2DataFrame} implementation.
|
* The default {@link Http2DataFrame} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class DefaultHttp2DataFrame extends AbstractHttp2StreamFrame implements Http2DataFrame {
|
public final class DefaultHttp2DataFrame extends AbstractHttp2StreamFrame implements Http2DataFrame {
|
||||||
private final ByteBuf content;
|
private final ByteBuf content;
|
||||||
private final boolean endStream;
|
private final boolean endStream;
|
||||||
|
@ -19,6 +19,7 @@ import io.netty.buffer.ByteBufAllocator;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.http2.Http2FrameReader.Configuration;
|
import io.netty.handler.codec.http2.Http2FrameReader.Configuration;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.handler.codec.http2.Http2CodecUtil.DEFAULT_MAX_FRAME_SIZE;
|
import static io.netty.handler.codec.http2.Http2CodecUtil.DEFAULT_MAX_FRAME_SIZE;
|
||||||
import static io.netty.handler.codec.http2.Http2CodecUtil.FRAME_HEADER_LENGTH;
|
import static io.netty.handler.codec.http2.Http2CodecUtil.FRAME_HEADER_LENGTH;
|
||||||
@ -50,6 +51,7 @@ import static io.netty.handler.codec.http2.Http2FrameTypes.WINDOW_UPDATE;
|
|||||||
/**
|
/**
|
||||||
* A {@link Http2FrameReader} that supports all frame types defined by the HTTP/2 specification.
|
* A {@link Http2FrameReader} that supports all frame types defined by the HTTP/2 specification.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration {
|
public class DefaultHttp2FrameReader implements Http2FrameReader, Http2FrameSizePolicy, Configuration {
|
||||||
private final Http2HeadersDecoder headersDecoder;
|
private final Http2HeadersDecoder headersDecoder;
|
||||||
|
|
||||||
|
@ -61,10 +61,12 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
import io.netty.handler.codec.http2.Http2CodecUtil.SimpleChannelPromiseAggregator;
|
import io.netty.handler.codec.http2.Http2CodecUtil.SimpleChannelPromiseAggregator;
|
||||||
import io.netty.handler.codec.http2.Http2FrameWriter.Configuration;
|
import io.netty.handler.codec.http2.Http2FrameWriter.Configuration;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link Http2FrameWriter} that supports all frame types defined by the HTTP/2 specification.
|
* A {@link Http2FrameWriter} that supports all frame types defined by the HTTP/2 specification.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2FrameWriter implements Http2FrameWriter, Http2FrameSizePolicy, Configuration {
|
public class DefaultHttp2FrameWriter implements Http2FrameWriter, Http2FrameSizePolicy, Configuration {
|
||||||
private static final String STREAM_ID = "Stream ID";
|
private static final String STREAM_ID = "Stream ID";
|
||||||
private static final String STREAM_DEPENDENCY = "Stream Dependency";
|
private static final String STREAM_DEPENDENCY = "Stream Dependency";
|
||||||
|
@ -18,11 +18,12 @@ package io.netty.handler.codec.http2;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.DefaultByteBufHolder;
|
import io.netty.buffer.DefaultByteBufHolder;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.netty.util.IllegalReferenceCountException;
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link Http2GoAwayFrame} implementation.
|
* The default {@link Http2GoAwayFrame} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implements Http2GoAwayFrame {
|
public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implements Http2GoAwayFrame {
|
||||||
private final long errorCode;
|
private final long errorCode;
|
||||||
private int extraStreamIds;
|
private int extraStreamIds;
|
||||||
@ -39,7 +40,7 @@ public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implemen
|
|||||||
/**
|
/**
|
||||||
* Equivalent to {@code new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER)}.
|
* Equivalent to {@code new DefaultHttp2GoAwayFrame(content, Unpooled.EMPTY_BUFFER)}.
|
||||||
*
|
*
|
||||||
* @param error reason for the go away
|
* @param errorCode reason for the go away
|
||||||
*/
|
*/
|
||||||
public DefaultHttp2GoAwayFrame(long errorCode) {
|
public DefaultHttp2GoAwayFrame(long errorCode) {
|
||||||
this(errorCode, Unpooled.EMPTY_BUFFER);
|
this(errorCode, Unpooled.EMPTY_BUFFER);
|
||||||
@ -58,7 +59,7 @@ public final class DefaultHttp2GoAwayFrame extends DefaultByteBufHolder implemen
|
|||||||
/**
|
/**
|
||||||
* Construct a new GOAWAY message.
|
* Construct a new GOAWAY message.
|
||||||
*
|
*
|
||||||
* @param error reason for the go away
|
* @param errorCode reason for the go away
|
||||||
* @param content non-{@code null} debug data
|
* @param content non-{@code null} debug data
|
||||||
*/
|
*/
|
||||||
public DefaultHttp2GoAwayFrame(long errorCode, ByteBuf content) {
|
public DefaultHttp2GoAwayFrame(long errorCode, ByteBuf content) {
|
||||||
|
@ -23,7 +23,9 @@ import io.netty.handler.codec.DefaultHeaders;
|
|||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
import io.netty.util.ByteProcessor;
|
import io.netty.util.ByteProcessor;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2Headers
|
public class DefaultHttp2Headers
|
||||||
extends DefaultHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers {
|
extends DefaultHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers {
|
||||||
private static final ByteProcessor HTTP2_NAME_VALIDATOR_PROCESSOR = new ByteProcessor() {
|
private static final ByteProcessor HTTP2_NAME_VALIDATOR_PROCESSOR = new ByteProcessor() {
|
||||||
|
@ -17,9 +17,10 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufInputStream;
|
import io.netty.buffer.ByteBufInputStream;
|
||||||
import io.netty.handler.codec.http2.hpack.Decoder;
|
import io.netty.handler.codec.http2.internal.hpack.Decoder;
|
||||||
import io.netty.handler.codec.http2.hpack.HeaderListener;
|
import io.netty.handler.codec.http2.internal.hpack.HeaderListener;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -32,6 +33,7 @@ import static io.netty.handler.codec.http2.Http2Error.INTERNAL_ERROR;
|
|||||||
import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
|
import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
|
||||||
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
|
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2HeadersDecoder implements Http2HeadersDecoder, Http2HeadersDecoder.Configuration {
|
public class DefaultHttp2HeadersDecoder implements Http2HeadersDecoder, Http2HeadersDecoder.Configuration {
|
||||||
private static final float HEADERS_COUNT_WEIGHT_NEW = 1 / 5f;
|
private static final float HEADERS_COUNT_WEIGHT_NEW = 1 / 5f;
|
||||||
private static final float HEADERS_COUNT_WEIGHT_HISTORICAL = 1 - HEADERS_COUNT_WEIGHT_NEW;
|
private static final float HEADERS_COUNT_WEIGHT_HISTORICAL = 1 - HEADERS_COUNT_WEIGHT_NEW;
|
||||||
|
@ -17,8 +17,9 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufOutputStream;
|
import io.netty.buffer.ByteBufOutputStream;
|
||||||
import io.netty.handler.codec.http2.hpack.Encoder;
|
import io.netty.handler.codec.http2.internal.hpack.Encoder;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -32,6 +33,7 @@ import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
|
|||||||
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
|
import static io.netty.handler.codec.http2.Http2Exception.connectionError;
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2HeadersEncoder implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration {
|
public class DefaultHttp2HeadersEncoder implements Http2HeadersEncoder, Http2HeadersEncoder.Configuration {
|
||||||
private final Encoder encoder;
|
private final Encoder encoder;
|
||||||
private final ByteArrayOutputStream tableSizeChangeOutput = new ByteArrayOutputStream();
|
private final ByteArrayOutputStream tableSizeChangeOutput = new ByteArrayOutputStream();
|
||||||
|
@ -15,11 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link Http2HeadersFrame} implementation.
|
* The default {@link Http2HeadersFrame} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class DefaultHttp2HeadersFrame extends AbstractHttp2StreamFrame implements Http2HeadersFrame {
|
public final class DefaultHttp2HeadersFrame extends AbstractHttp2StreamFrame implements Http2HeadersFrame {
|
||||||
private final Http2Headers headers;
|
private final Http2Headers headers;
|
||||||
private final boolean endStream;
|
private final boolean endStream;
|
||||||
|
@ -31,6 +31,7 @@ import io.netty.channel.ChannelHandlerContext;
|
|||||||
import io.netty.handler.codec.http2.Http2Exception.CompositeStreamException;
|
import io.netty.handler.codec.http2.Http2Exception.CompositeStreamException;
|
||||||
import io.netty.handler.codec.http2.Http2Exception.StreamException;
|
import io.netty.handler.codec.http2.Http2Exception.StreamException;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Basic implementation of {@link Http2LocalFlowController}.
|
* Basic implementation of {@link Http2LocalFlowController}.
|
||||||
@ -38,6 +39,7 @@ import io.netty.util.internal.PlatformDependent;
|
|||||||
* This class is <strong>NOT</strong> thread safe. The assumption is all methods must be invoked from a single thread.
|
* This class is <strong>NOT</strong> thread safe. The assumption is all methods must be invoked from a single thread.
|
||||||
* Typically this thread is the event loop thread for the {@link ChannelHandlerContext} managed by this class.
|
* Typically this thread is the event loop thread for the {@link ChannelHandlerContext} managed by this class.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DefaultHttp2LocalFlowController implements Http2LocalFlowController {
|
public class DefaultHttp2LocalFlowController implements Http2LocalFlowController {
|
||||||
/**
|
/**
|
||||||
* The default ratio of window size to initial window size below which a {@code WINDOW_UPDATE}
|
* The default ratio of window size to initial window size below which a {@code WINDOW_UPDATE}
|
||||||
|
@ -26,6 +26,7 @@ import static java.lang.Math.min;
|
|||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.codec.http2.StreamByteDistributor.Writer;
|
import io.netty.handler.codec.http2.StreamByteDistributor.Writer;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -38,6 +39,8 @@ import java.util.Deque;
|
|||||||
* This class is <strong>NOT</strong> thread safe. The assumption is all methods must be invoked from a single thread.
|
* This class is <strong>NOT</strong> thread safe. The assumption is all methods must be invoked from a single thread.
|
||||||
* Typically this thread is the event loop thread for the {@link ChannelHandlerContext} managed by this class.
|
* Typically this thread is the event loop thread for the {@link ChannelHandlerContext} managed by this class.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
|
|
||||||
public class DefaultHttp2RemoteFlowController implements Http2RemoteFlowController {
|
public class DefaultHttp2RemoteFlowController implements Http2RemoteFlowController {
|
||||||
private static final InternalLogger logger =
|
private static final InternalLogger logger =
|
||||||
InternalLoggerFactory.getInstance(DefaultHttp2RemoteFlowController.class);
|
InternalLoggerFactory.getInstance(DefaultHttp2RemoteFlowController.class);
|
||||||
|
@ -15,11 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default {@link Http2ResetFrame} implementation.
|
* The default {@link Http2ResetFrame} implementation.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class DefaultHttp2ResetFrame extends AbstractHttp2StreamFrame implements Http2ResetFrame {
|
public final class DefaultHttp2ResetFrame extends AbstractHttp2StreamFrame implements Http2ResetFrame {
|
||||||
private final long errorCode;
|
private final long errorCode;
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import io.netty.channel.embedded.EmbeddedChannel;
|
|||||||
import io.netty.handler.codec.ByteToMessageDecoder;
|
import io.netty.handler.codec.ByteToMessageDecoder;
|
||||||
import io.netty.handler.codec.compression.ZlibCodecFactory;
|
import io.netty.handler.codec.compression.ZlibCodecFactory;
|
||||||
import io.netty.handler.codec.compression.ZlibWrapper;
|
import io.netty.handler.codec.compression.ZlibWrapper;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
|
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_ENCODING;
|
||||||
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
|
import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_LENGTH;
|
||||||
@ -37,6 +38,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
* A HTTP2 frame listener that will decompress data frames according to the {@code content-encoding} header for each
|
* A HTTP2 frame listener that will decompress data frames according to the {@code content-encoding} header for each
|
||||||
* stream. The decompression provided by this class will be applied to the data for the entire stream.
|
* stream. The decompression provided by this class will be applied to the data for the entire stream.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecorator {
|
public class DelegatingDecompressorFrameListener extends Http2FrameListenerDecorator {
|
||||||
|
|
||||||
private final Http2Connection connection;
|
private final Http2Connection connection;
|
||||||
|
@ -16,7 +16,9 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.handler.codec.EmptyHeaders;
|
import io.netty.handler.codec.EmptyHeaders;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public final class EmptyHttp2Headers
|
public final class EmptyHttp2Headers
|
||||||
extends EmptyHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers {
|
extends EmptyHeaders<CharSequence, CharSequence, Http2Headers> implements Http2Headers {
|
||||||
public static final EmptyHttp2Headers INSTANCE = new EmptyHttp2Headers();
|
public static final EmptyHttp2Headers INSTANCE = new EmptyHttp2Headers();
|
||||||
|
@ -31,6 +31,7 @@ import io.netty.handler.codec.http.FullHttpResponse;
|
|||||||
import io.netty.handler.codec.http.HttpClientUpgradeHandler;
|
import io.netty.handler.codec.http.HttpClientUpgradeHandler;
|
||||||
import io.netty.handler.codec.http.HttpRequest;
|
import io.netty.handler.codec.http.HttpRequest;
|
||||||
import io.netty.util.collection.CharObjectMap;
|
import io.netty.util.collection.CharObjectMap;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -39,6 +40,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Client-side cleartext upgrade codec from HTTP to HTTP/2.
|
* Client-side cleartext upgrade codec from HTTP to HTTP/2.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2ClientUpgradeCodec implements HttpClientUpgradeHandler.UpgradeCodec {
|
public class Http2ClientUpgradeCodec implements HttpClientUpgradeHandler.UpgradeCodec {
|
||||||
|
|
||||||
private static final List<CharSequence> UPGRADE_HEADERS = Collections.singletonList(HTTP_UPGRADE_SETTINGS_HEADER);
|
private static final List<CharSequence> UPGRADE_HEADERS = Collections.singletonList(HTTP_UPGRADE_SETTINGS_HEADER);
|
||||||
|
@ -25,6 +25,7 @@ import io.netty.channel.DefaultChannelPromise;
|
|||||||
import io.netty.handler.ssl.ApplicationProtocolNames;
|
import io.netty.handler.ssl.ApplicationProtocolNames;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.buffer.Unpooled.directBuffer;
|
import static io.netty.buffer.Unpooled.directBuffer;
|
||||||
import static io.netty.buffer.Unpooled.unreleasableBuffer;
|
import static io.netty.buffer.Unpooled.unreleasableBuffer;
|
||||||
@ -35,6 +36,7 @@ import static java.lang.Math.min;
|
|||||||
/**
|
/**
|
||||||
* Constants and utility method used for encoding/decoding HTTP2 frames.
|
* Constants and utility method used for encoding/decoding HTTP2 frames.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2CodecUtil {
|
public final class Http2CodecUtil {
|
||||||
public static final int CONNECTION_STREAM_ID = 0;
|
public static final int CONNECTION_STREAM_ID = 0;
|
||||||
public static final int HTTP_UPGRADE_STREAM_ID = 1;
|
public static final int HTTP_UPGRADE_STREAM_ID = 1;
|
||||||
|
@ -18,10 +18,12 @@ package io.netty.handler.codec.http2;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager for the state of an HTTP/2 connection with the remote end-point.
|
* Manager for the state of an HTTP/2 connection with the remote end-point.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2Connection {
|
public interface Http2Connection {
|
||||||
/**
|
/**
|
||||||
* Listener for life-cycle events for streams in this connection.
|
* Listener for life-cycle events for streams in this connection.
|
||||||
|
@ -15,10 +15,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides empty implementations of all {@link Http2Connection.Listener} methods.
|
* Provides empty implementations of all {@link Http2Connection.Listener} methods.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2ConnectionAdapter implements Http2Connection.Listener {
|
public class Http2ConnectionAdapter implements Http2Connection.Listener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -16,6 +16,7 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,6 +27,7 @@ import java.util.List;
|
|||||||
* application-specific processing. Note that frames of an unknown type (i.e. HTTP/2 extensions)
|
* application-specific processing. Note that frames of an unknown type (i.e. HTTP/2 extensions)
|
||||||
* will skip all protocol checks and be given directly to the listener for processing.
|
* will skip all protocol checks and be given directly to the listener for processing.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2ConnectionDecoder extends Closeable {
|
public interface Http2ConnectionDecoder extends Closeable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,11 +18,13 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for outbound HTTP/2 traffic.
|
* Handler for outbound HTTP/2 traffic.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2ConnectionEncoder extends Http2FrameWriter {
|
public interface Http2ConnectionEncoder extends Http2FrameWriter {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,6 +26,7 @@ import io.netty.handler.codec.http2.Http2Exception.CompositeStreamException;
|
|||||||
import io.netty.handler.codec.http2.Http2Exception.StreamException;
|
import io.netty.handler.codec.http2.Http2Exception.StreamException;
|
||||||
import io.netty.util.concurrent.ScheduledFuture;
|
import io.netty.util.concurrent.ScheduledFuture;
|
||||||
import io.netty.util.internal.OneTimeTask;
|
import io.netty.util.internal.OneTimeTask;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
|||||||
* This interface enforces inbound flow control functionality through
|
* This interface enforces inbound flow control functionality through
|
||||||
* {@link Http2LocalFlowController}
|
* {@link Http2LocalFlowController}
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2ConnectionHandler extends ByteToMessageDecoder implements Http2LifecycleManager,
|
public class Http2ConnectionHandler extends ByteToMessageDecoder implements Http2LifecycleManager,
|
||||||
ChannelOutboundHandler {
|
ChannelOutboundHandler {
|
||||||
|
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builder which builds {@link Http2ConnectionHandler} objects.
|
* Builder which builds {@link Http2ConnectionHandler} objects.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2ConnectionHandlerBuilder
|
public final class Http2ConnectionHandlerBuilder
|
||||||
extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler, Http2ConnectionHandlerBuilder> {
|
extends AbstractHttp2ConnectionHandlerBuilder<Http2ConnectionHandler, Http2ConnectionHandlerBuilder> {
|
||||||
|
|
||||||
|
@ -17,10 +17,12 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufHolder;
|
import io.netty.buffer.ByteBufHolder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HTTP/2 DATA frame.
|
* HTTP/2 DATA frame.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2DataFrame extends Http2StreamFrame, ByteBufHolder {
|
public interface Http2DataFrame extends Http2StreamFrame, ByteBufHolder {
|
||||||
@Override
|
@Override
|
||||||
Http2DataFrame setStream(Object stream);
|
Http2DataFrame setStream(Object stream);
|
||||||
|
@ -18,10 +18,12 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface that defines an object capable of producing HTTP/2 data frames.
|
* Interface that defines an object capable of producing HTTP/2 data frames.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2DataWriter {
|
public interface Http2DataWriter {
|
||||||
/**
|
/**
|
||||||
* Writes a {@code DATA} frame to the remote endpoint. This will result in one or more
|
* Writes a {@code DATA} frame to the remote endpoint. This will result in one or more
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All error codes identified by the HTTP/2 spec.
|
* All error codes identified by the HTTP/2 spec.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public enum Http2Error {
|
public enum Http2Error {
|
||||||
NO_ERROR(0x0),
|
NO_ERROR(0x0),
|
||||||
PROTOCOL_ERROR(0x1),
|
PROTOCOL_ERROR(0x1),
|
||||||
|
@ -16,11 +16,13 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class brings {@link Http2Connection.Listener} and {@link Http2FrameListener} together to provide
|
* This class brings {@link Http2Connection.Listener} and {@link Http2FrameListener} together to provide
|
||||||
* NOOP implementation so inheriting classes can selectively choose which methods to override.
|
* NOOP implementation so inheriting classes can selectively choose which methods to override.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2EventAdapter implements Http2Connection.Listener, Http2FrameListener {
|
public class Http2EventAdapter implements Http2Connection.Listener, Http2FrameListener {
|
||||||
@Override
|
@Override
|
||||||
public int onDataRead(ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endOfStream)
|
public int onDataRead(ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endOfStream)
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -25,6 +27,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* Exception thrown when an HTTP/2 error was encountered.
|
* Exception thrown when an HTTP/2 error was encountered.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2Exception extends Exception {
|
public class Http2Exception extends Exception {
|
||||||
private static final long serialVersionUID = -6941186345430164209L;
|
private static final long serialVersionUID = -6941186345430164209L;
|
||||||
private final Http2Error error;
|
private final Http2Error error;
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides utility methods for accessing specific flags as defined by the HTTP/2 spec.
|
* Provides utility methods for accessing specific flags as defined by the HTTP/2 spec.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2Flags {
|
public final class Http2Flags {
|
||||||
public static final short END_STREAM = 0x1;
|
public static final short END_STREAM = 0x1;
|
||||||
public static final short END_HEADERS = 0x4;
|
public static final short END_HEADERS = 0x4;
|
||||||
|
@ -15,10 +15,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base interface for all HTTP/2 flow controllers.
|
* Base interface for all HTTP/2 flow controllers.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2FlowController {
|
public interface Http2FlowController {
|
||||||
/**
|
/**
|
||||||
* Set the {@link ChannelHandlerContext} for which to apply flow control on.
|
* Set the {@link ChannelHandlerContext} for which to apply flow control on.
|
||||||
|
@ -15,5 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/** An HTTP/2 frame. */
|
/** An HTTP/2 frame. */
|
||||||
|
@UnstableApi
|
||||||
public interface Http2Frame { }
|
public interface Http2Frame { }
|
||||||
|
@ -16,10 +16,12 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience class that provides no-op implementations for all methods of {@link Http2FrameListener}.
|
* Convenience class that provides no-op implementations for all methods of {@link Http2FrameListener}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2FrameAdapter implements Http2FrameListener {
|
public class Http2FrameAdapter implements Http2FrameListener {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,10 +17,12 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An listener of HTTP/2 frames.
|
* An listener of HTTP/2 frames.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2FrameListener {
|
public interface Http2FrameListener {
|
||||||
/**
|
/**
|
||||||
* Handles an inbound {@code DATA} frame.
|
* Handles an inbound {@code DATA} frame.
|
||||||
|
@ -17,10 +17,12 @@ package io.netty.handler.codec.http2;
|
|||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a decorator around a {@link Http2FrameListener} and delegates all method calls
|
* Provides a decorator around a {@link Http2FrameListener} and delegates all method calls
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2FrameListenerDecorator implements Http2FrameListener {
|
public class Http2FrameListenerDecorator implements Http2FrameListener {
|
||||||
protected final Http2FrameListener listener;
|
protected final Http2FrameListener listener;
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import io.netty.buffer.ByteBufUtil;
|
|||||||
import io.netty.channel.ChannelHandlerAdapter;
|
import io.netty.channel.ChannelHandlerAdapter;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogLevel;
|
import io.netty.util.internal.logging.InternalLogLevel;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
@ -29,6 +30,7 @@ import io.netty.util.internal.logging.InternalLoggerFactory;
|
|||||||
/**
|
/**
|
||||||
* Logs HTTP2 frames for debugging purposes.
|
* Logs HTTP2 frames for debugging purposes.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2FrameLogger extends ChannelHandlerAdapter {
|
public class Http2FrameLogger extends ChannelHandlerAdapter {
|
||||||
|
|
||||||
public enum Direction {
|
public enum Direction {
|
||||||
|
@ -17,6 +17,7 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
|
|
||||||
@ -24,6 +25,7 @@ import java.io.Closeable;
|
|||||||
* Reads HTTP/2 frames from an input {@link ByteBuf} and notifies the specified
|
* Reads HTTP/2 frames from an input {@link ByteBuf} and notifies the specified
|
||||||
* {@link Http2FrameListener} when frames are complete.
|
* {@link Http2FrameListener} when frames are complete.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2FrameReader extends Closeable {
|
public interface Http2FrameReader extends Closeable {
|
||||||
/**
|
/**
|
||||||
* Configuration specific to {@link Http2FrameReader}
|
* Configuration specific to {@link Http2FrameReader}
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
|
@UnstableApi
|
||||||
public interface Http2FrameSizePolicy {
|
public interface Http2FrameSizePolicy {
|
||||||
/**
|
/**
|
||||||
* Sets the maximum allowed frame size. Attempts to write frames longer than this maximum will fail.
|
* Sets the maximum allowed frame size. Attempts to write frames longer than this maximum will fail.
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registry of all standard frame types defined by the HTTP/2 specification.
|
* Registry of all standard frame types defined by the HTTP/2 specification.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2FrameTypes {
|
public final class Http2FrameTypes {
|
||||||
public static final byte DATA = 0x0;
|
public static final byte DATA = 0x0;
|
||||||
public static final byte HEADERS = 0x1;
|
public static final byte HEADERS = 0x1;
|
||||||
|
@ -19,6 +19,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
|
|
||||||
@ -27,6 +28,7 @@ import java.io.Closeable;
|
|||||||
* this interface write to the context, but DO NOT FLUSH. To perform a flush, you must separately
|
* this interface write to the context, but DO NOT FLUSH. To perform a flush, you must separately
|
||||||
* call {@link ChannelHandlerContext#flush()}.
|
* call {@link ChannelHandlerContext#flush()}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2FrameWriter extends Http2DataWriter, Closeable {
|
public interface Http2FrameWriter extends Http2DataWriter, Closeable {
|
||||||
/**
|
/**
|
||||||
* Configuration specific to {@link Http2FrameWriter}
|
* Configuration specific to {@link Http2FrameWriter}
|
||||||
|
@ -17,11 +17,13 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufHolder;
|
import io.netty.buffer.ByteBufHolder;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HTTP/2 GOAWAY frame. Last-Stream-Id is not exposed directly, but instead via the relative {@link
|
* HTTP/2 GOAWAY frame. Last-Stream-Id is not exposed directly, but instead via the relative {@link
|
||||||
* #extraStreamIds()}.
|
* #extraStreamIds()}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2GoAwayFrame extends Http2Frame, ByteBufHolder {
|
public interface Http2GoAwayFrame extends Http2Frame, ByteBufHolder {
|
||||||
/**
|
/**
|
||||||
* The reason for beginning closure of the connection. Represented as an HTTP/2 error code.
|
* The reason for beginning closure of the connection. Represented as an HTTP/2 error code.
|
||||||
|
@ -14,9 +14,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a common interface for encoding and processing HPACK header constraints
|
* Extracts a common interface for encoding and processing HPACK header constraints
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2HeaderTable {
|
public interface Http2HeaderTable {
|
||||||
/**
|
/**
|
||||||
* Sets the maximum size of the HPACK header table used for decoding HTTP/2 headers.
|
* Sets the maximum size of the HPACK header table used for decoding HTTP/2 headers.
|
||||||
|
@ -17,6 +17,7 @@ package io.netty.handler.codec.http2;
|
|||||||
|
|
||||||
import io.netty.handler.codec.Headers;
|
import io.netty.handler.codec.Headers;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
@ -24,6 +25,7 @@ import java.util.Map.Entry;
|
|||||||
/**
|
/**
|
||||||
* A collection of headers sent or received via HTTP/2.
|
* A collection of headers sent or received via HTTP/2.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2Headers extends Headers<CharSequence, CharSequence, Http2Headers> {
|
public interface Http2Headers extends Headers<CharSequence, CharSequence, Http2Headers> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,10 +16,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes HPACK-encoded headers blocks into {@link Http2Headers}.
|
* Decodes HPACK-encoded headers blocks into {@link Http2Headers}.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2HeadersDecoder {
|
public interface Http2HeadersDecoder {
|
||||||
/**
|
/**
|
||||||
* Configuration related elements for the {@link Http2HeadersDecoder} interface
|
* Configuration related elements for the {@link Http2HeadersDecoder} interface
|
||||||
|
@ -16,10 +16,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes {@link Http2Headers} into HPACK-encoded headers blocks.
|
* Encodes {@link Http2Headers} into HPACK-encoded headers blocks.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2HeadersEncoder {
|
public interface Http2HeadersEncoder {
|
||||||
/**
|
/**
|
||||||
* Configuration related elements for the {@link Http2HeadersEncoder} interface
|
* Configuration related elements for the {@link Http2HeadersEncoder} interface
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HTTP/2 HEADERS frame.
|
* HTTP/2 HEADERS frame.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2HeadersFrame extends Http2StreamFrame {
|
public interface Http2HeadersFrame extends Http2StreamFrame {
|
||||||
@Override
|
@Override
|
||||||
Http2HeadersFrame setStream(Object stream);
|
Http2HeadersFrame setStream(Object stream);
|
||||||
|
@ -19,11 +19,13 @@ import static io.netty.handler.codec.http2.Http2FrameLogger.Direction.INBOUND;
|
|||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator around a {@link Http2FrameReader} that logs all inbound frames before calling
|
* Decorator around a {@link Http2FrameReader} that logs all inbound frames before calling
|
||||||
* back the listener.
|
* back the listener.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2InboundFrameLogger implements Http2FrameReader {
|
public class Http2InboundFrameLogger implements Http2FrameReader {
|
||||||
private final Http2FrameReader reader;
|
private final Http2FrameReader reader;
|
||||||
private final Http2FrameLogger logger;
|
private final Http2FrameLogger logger;
|
||||||
|
@ -18,11 +18,13 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager for the life cycle of the HTTP/2 connection. Handles graceful shutdown of the channel,
|
* Manager for the life cycle of the HTTP/2 connection. Handles graceful shutdown of the channel,
|
||||||
* closing only after all of the streams have closed.
|
* closing only after all of the streams have closed.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2LifecycleManager {
|
public interface Http2LifecycleManager {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,10 +15,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link Http2FlowController} for controlling the inbound flow of {@code DATA} frames from the remote endpoint.
|
* A {@link Http2FlowController} for controlling the inbound flow of {@code DATA} frames from the remote endpoint.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2LocalFlowController extends Http2FlowController {
|
public interface Http2LocalFlowController extends Http2FlowController {
|
||||||
/**
|
/**
|
||||||
* Sets the writer to be use for sending {@code WINDOW_UPDATE} frames. This must be called before any flow
|
* Sets the writer to be use for sending {@code WINDOW_UPDATE} frames. This must be called before any flow
|
||||||
|
@ -34,6 +34,7 @@ import io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeEvent;
|
|||||||
import io.netty.util.ReferenceCountUtil;
|
import io.netty.util.ReferenceCountUtil;
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.internal.OneTimeTask;
|
import io.netty.util.internal.OneTimeTask;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -71,6 +72,7 @@ import java.util.List;
|
|||||||
* <p>{@link ChannelConfig#setMaxMessagesPerRead(int)} and {@link
|
* <p>{@link ChannelConfig#setMaxMessagesPerRead(int)} and {@link
|
||||||
* ChannelConfig#setAutoRead(boolean)} are supported.
|
* ChannelConfig#setAutoRead(boolean)} are supported.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2MultiplexCodec extends ChannelDuplexHandler {
|
public final class Http2MultiplexCodec extends ChannelDuplexHandler {
|
||||||
private static final Http2FrameLogger HTTP2_FRAME_LOGGER = new Http2FrameLogger(INFO, Http2MultiplexCodec.class);
|
private static final Http2FrameLogger HTTP2_FRAME_LOGGER = new Http2FrameLogger(INFO, Http2MultiplexCodec.class);
|
||||||
|
|
||||||
|
@ -14,11 +14,14 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
|
import static io.netty.handler.codec.http2.Http2Error.PROTOCOL_ERROR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This exception is thrown when there are no more stream IDs available for the current connection
|
* This exception is thrown when there are no more stream IDs available for the current connection
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2NoMoreStreamIdsException extends Http2Exception {
|
public class Http2NoMoreStreamIdsException extends Http2Exception {
|
||||||
private static final long serialVersionUID = -7756236161274851110L;
|
private static final long serialVersionUID = -7756236161274851110L;
|
||||||
private static final String ERROR_MESSAGE = "No more streams can be created on this connection";
|
private static final String ERROR_MESSAGE = "No more streams can be created on this connection";
|
||||||
|
@ -21,11 +21,13 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decorator around a {@link Http2FrameWriter} that logs all outbound frames before calling the
|
* Decorator around a {@link Http2FrameWriter} that logs all outbound frames before calling the
|
||||||
* writer.
|
* writer.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2OutboundFrameLogger implements Http2FrameWriter {
|
public class Http2OutboundFrameLogger implements Http2FrameWriter {
|
||||||
private final Http2FrameWriter writer;
|
private final Http2FrameWriter writer;
|
||||||
private final Http2FrameLogger logger;
|
private final Http2FrameLogger logger;
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an extensibility point for users to define the validity of push requests.
|
* Provides an extensibility point for users to define the validity of push requests.
|
||||||
* @see <a href="https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8.2">[RFC http2], Section 8.2</a>.
|
* @see <a href="https://tools.ietf.org/html/draft-ietf-httpbis-http2-17#section-8.2">[RFC http2], Section 8.2</a>.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2PromisedRequestVerifier {
|
public interface Http2PromisedRequestVerifier {
|
||||||
/**
|
/**
|
||||||
* Determine if a {@link Http2Headers} are authoritative for a particular {@link ChannelHandlerContext}.
|
* Determine if a {@link Http2Headers} are authoritative for a particular {@link ChannelHandlerContext}.
|
||||||
|
@ -15,11 +15,13 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link Http2FlowController} for controlling the flow of outbound {@code DATA} frames to the remote
|
* A {@link Http2FlowController} for controlling the flow of outbound {@code DATA} frames to the remote
|
||||||
* endpoint.
|
* endpoint.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2RemoteFlowController extends Http2FlowController {
|
public interface Http2RemoteFlowController extends Http2FlowController {
|
||||||
/**
|
/**
|
||||||
* Get the {@link ChannelHandlerContext} for which to apply flow control on.
|
* Get the {@link ChannelHandlerContext} for which to apply flow control on.
|
||||||
|
@ -15,7 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/** HTTP/2 RST_STREAM frame. */
|
/** HTTP/2 RST_STREAM frame. */
|
||||||
|
@UnstableApi
|
||||||
public interface Http2ResetFrame extends Http2StreamFrame {
|
public interface Http2ResetFrame extends Http2StreamFrame {
|
||||||
@Override
|
@Override
|
||||||
Http2ResetFrame setStream(Object stream);
|
Http2ResetFrame setStream(Object stream);
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -23,6 +25,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Provides utilities related to security requirements specific to HTTP/2.
|
* Provides utilities related to security requirements specific to HTTP/2.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2SecurityUtil {
|
public final class Http2SecurityUtil {
|
||||||
/**
|
/**
|
||||||
* The following list is derived from <a
|
* The following list is derived from <a
|
||||||
|
@ -24,6 +24,7 @@ import io.netty.handler.codec.http.FullHttpResponse;
|
|||||||
import io.netty.handler.codec.http.HttpHeaders;
|
import io.netty.handler.codec.http.HttpHeaders;
|
||||||
import io.netty.handler.codec.http.HttpServerUpgradeHandler;
|
import io.netty.handler.codec.http.HttpServerUpgradeHandler;
|
||||||
import io.netty.util.CharsetUtil;
|
import io.netty.util.CharsetUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -42,6 +43,7 @@ import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
|||||||
/**
|
/**
|
||||||
* Server-side codec for performing a cleartext upgrade from HTTP/1.x to HTTP/2.
|
* Server-side codec for performing a cleartext upgrade from HTTP/1.x to HTTP/2.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class Http2ServerUpgradeCodec implements HttpServerUpgradeHandler.UpgradeCodec {
|
public class Http2ServerUpgradeCodec implements HttpServerUpgradeHandler.UpgradeCodec {
|
||||||
|
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(Http2ServerUpgradeCodec.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(Http2ServerUpgradeCodec.class);
|
||||||
|
@ -34,12 +34,14 @@ import static io.netty.handler.codec.http2.Http2CodecUtil.isMaxFrameSizeValid;
|
|||||||
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
import static io.netty.util.internal.ObjectUtil.checkNotNull;
|
||||||
|
|
||||||
import io.netty.util.collection.CharObjectHashMap;
|
import io.netty.util.collection.CharObjectHashMap;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings for one endpoint in an HTTP/2 connection. Each of the values are optional as defined in
|
* Settings for one endpoint in an HTTP/2 connection. Each of the values are optional as defined in
|
||||||
* the spec for the SETTINGS frame. Permits storage of arbitrary key/value pairs but provides helper
|
* the spec for the SETTINGS frame. Permits storage of arbitrary key/value pairs but provides helper
|
||||||
* methods for standard settings.
|
* methods for standard settings.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class Http2Settings extends CharObjectHashMap<Long> {
|
public final class Http2Settings extends CharObjectHashMap<Long> {
|
||||||
/**
|
/**
|
||||||
* Default capacity based on the number of standard settings from the HTTP/2 spec, adjusted so that adding all of
|
* Default capacity based on the number of standard settings from the HTTP/2 spec, adjusted so that adding all of
|
||||||
|
@ -15,9 +15,12 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A single stream within an HTTP2 connection. Streams are compared to each other by priority.
|
* A single stream within an HTTP2 connection. Streams are compared to each other by priority.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2Stream {
|
public interface Http2Stream {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A frame whose meaning <em>may</em> apply to a particular stream, instead of the entire
|
* A frame whose meaning <em>may</em> apply to a particular stream, instead of the entire
|
||||||
* connection. It is still possibly for this frame type to apply to the entire connection. In such
|
* connection. It is still possibly for this frame type to apply to the entire connection. In such
|
||||||
@ -24,6 +26,7 @@ package io.netty.handler.codec.http2;
|
|||||||
* <p>The meaning of {@code stream} is context-dependent and may change as a frame is processed in
|
* <p>The meaning of {@code stream} is context-dependent and may change as a frame is processed in
|
||||||
* the pipeline.
|
* the pipeline.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2StreamFrame extends Http2Frame {
|
public interface Http2StreamFrame extends Http2Frame {
|
||||||
/**
|
/**
|
||||||
* Set the stream identifier for this message.
|
* Set the stream identifier for this message.
|
||||||
|
@ -14,9 +14,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A visitor that allows iteration over a collection of streams.
|
* A visitor that allows iteration over a collection of streams.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public interface Http2StreamVisitor {
|
public interface Http2StreamVisitor {
|
||||||
/**
|
/**
|
||||||
* @return <ul>
|
* @return <ul>
|
||||||
|
@ -31,6 +31,7 @@ import io.netty.handler.codec.http.HttpResponseStatus;
|
|||||||
import io.netty.handler.codec.http.HttpUtil;
|
import io.netty.handler.codec.http.HttpUtil;
|
||||||
import io.netty.handler.codec.http.HttpVersion;
|
import io.netty.handler.codec.http.HttpVersion;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -52,6 +53,7 @@ import static io.netty.util.internal.StringUtil.length;
|
|||||||
/**
|
/**
|
||||||
* Provides utility methods and constants for the HTTP/2 to HTTP conversion
|
* Provides utility methods and constants for the HTTP/2 to HTTP conversion
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class HttpConversionUtil {
|
public final class HttpConversionUtil {
|
||||||
/**
|
/**
|
||||||
* The set of headers that should not be directly copied when converting headers from HTTP to HTTP/2.
|
* The set of headers that should not be directly copied when converting headers from HTTP to HTTP/2.
|
||||||
|
@ -25,12 +25,14 @@ import io.netty.handler.codec.http.HttpMessage;
|
|||||||
import io.netty.handler.codec.http.LastHttpContent;
|
import io.netty.handler.codec.http.LastHttpContent;
|
||||||
import io.netty.handler.codec.http2.Http2CodecUtil.SimpleChannelPromiseAggregator;
|
import io.netty.handler.codec.http2.Http2CodecUtil.SimpleChannelPromiseAggregator;
|
||||||
import io.netty.util.ReferenceCountUtil;
|
import io.netty.util.ReferenceCountUtil;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translates HTTP/1.x object writes into HTTP/2 frames.
|
* Translates HTTP/1.x object writes into HTTP/2 frames.
|
||||||
* <p>
|
* <p>
|
||||||
* See {@link InboundHttp2ToHttpAdapter} to get translation from HTTP/2 frames to HTTP/1.x objects.
|
* See {@link InboundHttp2ToHttpAdapter} to get translation from HTTP/2 frames to HTTP/1.x objects.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public class HttpToHttp2ConnectionHandler extends Http2ConnectionHandler {
|
public class HttpToHttp2ConnectionHandler extends Http2ConnectionHandler {
|
||||||
|
|
||||||
private final boolean validateHeaders;
|
private final boolean validateHeaders;
|
||||||
|
@ -17,10 +17,12 @@
|
|||||||
package io.netty.handler.codec.http2;
|
package io.netty.handler.codec.http2;
|
||||||
|
|
||||||
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
import io.netty.handler.codec.http2.Http2HeadersEncoder.SensitivityDetector;
|
||||||
|
import io.netty.util.internal.UnstableApi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builder which builds {@link HttpToHttp2ConnectionHandler} objects.
|
* Builder which builds {@link HttpToHttp2ConnectionHandler} objects.
|
||||||
*/
|
*/
|
||||||
|
@UnstableApi
|
||||||
public final class HttpToHttp2ConnectionHandlerBuilder extends
|
public final class HttpToHttp2ConnectionHandlerBuilder extends
|
||||||
AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder> {
|
AbstractHttp2ConnectionHandlerBuilder<HttpToHttp2ConnectionHandler, HttpToHttp2ConnectionHandlerBuilder> {
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user