Package io.netty.handler.codec.http2
Enum Http2Headers.PseudoHeaderName
- java.lang.Object
-
- java.lang.Enum<Http2Headers.PseudoHeaderName>
-
- io.netty.handler.codec.http2.Http2Headers.PseudoHeaderName
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Http2Headers.PseudoHeaderName>
- Enclosing interface:
- Http2Headers
public static enum Http2Headers.PseudoHeaderName extends java.lang.Enum<Http2Headers.PseudoHeaderName>
HTTP/2 pseudo-headers names.
-
-
Field Summary
Fields Modifier and Type Field Description private static char
PSEUDO_HEADER_PREFIX
private static byte
PSEUDO_HEADER_PREFIX_BYTE
private static CharSequenceMap<Http2Headers.PseudoHeaderName>
PSEUDO_HEADERS
private boolean
requestOnly
private AsciiString
value
-
Constructor Summary
Constructors Modifier Constructor Description private
PseudoHeaderName(java.lang.String value, boolean requestOnly)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Http2Headers.PseudoHeaderName
getPseudoHeader(java.lang.CharSequence header)
Returns theHttp2Headers.PseudoHeaderName
corresponding to the specified header name.static boolean
hasPseudoHeaderFormat(java.lang.CharSequence headerName)
Indicates whether the specified header follows the pseudo-header format (begins with ':' character)static boolean
isPseudoHeader(java.lang.CharSequence header)
Indicates whether the given header name is a valid HTTP/2 pseudo header.boolean
isRequestOnly()
Indicates whether the pseudo-header is to be used in a request context.AsciiString
value()
static Http2Headers.PseudoHeaderName
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Http2Headers.PseudoHeaderName[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
METHOD
public static final Http2Headers.PseudoHeaderName METHOD
:method
.
-
SCHEME
public static final Http2Headers.PseudoHeaderName SCHEME
:scheme
.
-
AUTHORITY
public static final Http2Headers.PseudoHeaderName AUTHORITY
:authority
.
-
PATH
public static final Http2Headers.PseudoHeaderName PATH
:path
.
-
STATUS
public static final Http2Headers.PseudoHeaderName STATUS
:status
.
-
-
Field Detail
-
PSEUDO_HEADER_PREFIX
private static final char PSEUDO_HEADER_PREFIX
- See Also:
- Constant Field Values
-
PSEUDO_HEADER_PREFIX_BYTE
private static final byte PSEUDO_HEADER_PREFIX_BYTE
- See Also:
- Constant Field Values
-
value
private final AsciiString value
-
requestOnly
private final boolean requestOnly
-
PSEUDO_HEADERS
private static final CharSequenceMap<Http2Headers.PseudoHeaderName> PSEUDO_HEADERS
-
-
Method Detail
-
values
public static Http2Headers.PseudoHeaderName[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Http2Headers.PseudoHeaderName c : Http2Headers.PseudoHeaderName.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Http2Headers.PseudoHeaderName valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
value
public AsciiString value()
-
hasPseudoHeaderFormat
public static boolean hasPseudoHeaderFormat(java.lang.CharSequence headerName)
Indicates whether the specified header follows the pseudo-header format (begins with ':' character)- Returns:
true
if the header follow the pseudo-header format
-
isPseudoHeader
public static boolean isPseudoHeader(java.lang.CharSequence header)
Indicates whether the given header name is a valid HTTP/2 pseudo header.
-
getPseudoHeader
public static Http2Headers.PseudoHeaderName getPseudoHeader(java.lang.CharSequence header)
Returns theHttp2Headers.PseudoHeaderName
corresponding to the specified header name.- Returns:
- corresponding
Http2Headers.PseudoHeaderName
if any,null
otherwise.
-
isRequestOnly
public boolean isRequestOnly()
Indicates whether the pseudo-header is to be used in a request context.- Returns:
true
if the pseudo-header is to be used in a request context
-
-