Package org.refcodes.net
Enum HeaderField
- java.lang.Object
-
- java.lang.Enum<HeaderField>
-
- org.refcodes.net.HeaderField
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HeaderField>
,org.refcodes.mixin.NameAccessor
public enum HeaderField extends java.lang.Enum<HeaderField> implements org.refcodes.mixin.NameAccessor
The Enum HeaderField.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCEPT
ACCEPT_CHARSET
ACCEPT_ENCODING
ACCESS_TOKEN
The access token, see alsoTokenType
.ALLOW
AUTHORIZATION
CONNECTION
CONTENT_ENCODING
CONTENT_LANGUAGE
CONTENT_LENGTH
CONTENT_LOCATION
CONTENT_MD5
CONTENT_RANGE
CONTENT_TYPE
COOKIE
The Cookie HTTP Request-Header contains stored HTTP cookies previously sent by the server with theSET_COOKIE
header.EXPIRES
EXPIRES_IN
EXTENSION_HEADER
HOST
LAST_MODIFIED
REFRESH_TOKEN
REQUEST_ID
SCOPE
OAuth scopes let you specify exactly how your application needs to access a user's resource.SESSION_ID
SET_COOKIE
The Set-Cookie HTTP Response-Header is used to send cookies from the server to the user agent.TOKEN_TYPE
Token type, see alsoTokenType
.USER_AGENT
WWW_AUTHENTICATE
X_B3_PARENT_SPAN_ID
B3 ids are fixed-length lowerhex encoded values.X_B3_TRACE_ID
B3 ids are fixed-length lowerhex encoded values.X_B3_TRACE_SPAN_ID
B3 ids are fixed-length lowerhex encoded values.X_REQUEST_ID
The X-RequestId Header-Field MUST be a combination of a globally unique value in the format of a GUID followed by an increasing decimal counter which MUST increase with every new HTTP-Request (for example, "{E2EA6C1C-E61B-49E9-9CFB-38184F907552}:123456").
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
static HeaderField
toHeaderField(java.lang.String aHttpHeaderField)
Retrieves theHeaderField
which corresponds to the given HTTP Header-Field name.static java.lang.String
toHttpHeaderField(java.lang.String aHttpHeaderField)
Normalizes the input HTTP Header-Field to match the case of the Header-Fields as defined in thisHeaderField
enumeration.static HeaderField
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HeaderField[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AUTHORIZATION
public static final HeaderField AUTHORIZATION
-
ALLOW
public static final HeaderField ALLOW
-
CONTENT_ENCODING
public static final HeaderField CONTENT_ENCODING
-
CONTENT_LANGUAGE
public static final HeaderField CONTENT_LANGUAGE
-
CONTENT_LENGTH
public static final HeaderField CONTENT_LENGTH
-
CONTENT_LOCATION
public static final HeaderField CONTENT_LOCATION
-
CONTENT_MD5
public static final HeaderField CONTENT_MD5
-
CONTENT_RANGE
public static final HeaderField CONTENT_RANGE
-
CONTENT_TYPE
public static final HeaderField CONTENT_TYPE
-
EXPIRES
public static final HeaderField EXPIRES
-
LAST_MODIFIED
public static final HeaderField LAST_MODIFIED
-
EXTENSION_HEADER
public static final HeaderField EXTENSION_HEADER
-
COOKIE
public static final HeaderField COOKIE
The Cookie HTTP Request-Header contains stored HTTP cookies previously sent by the server with theSET_COOKIE
header.
-
SET_COOKIE
public static final HeaderField SET_COOKIE
The Set-Cookie HTTP Response-Header is used to send cookies from the server to the user agent.
-
ACCEPT
public static final HeaderField ACCEPT
-
ACCEPT_ENCODING
public static final HeaderField ACCEPT_ENCODING
-
ACCEPT_CHARSET
public static final HeaderField ACCEPT_CHARSET
-
CONNECTION
public static final HeaderField CONNECTION
-
HOST
public static final HeaderField HOST
-
USER_AGENT
public static final HeaderField USER_AGENT
-
REQUEST_ID
public static final HeaderField REQUEST_ID
-
SESSION_ID
public static final HeaderField SESSION_ID
-
WWW_AUTHENTICATE
public static final HeaderField WWW_AUTHENTICATE
-
X_B3_TRACE_ID
public static final HeaderField X_B3_TRACE_ID
B3 ids are fixed-length lowerhex encoded values.
-
X_B3_TRACE_SPAN_ID
public static final HeaderField X_B3_TRACE_SPAN_ID
B3 ids are fixed-length lowerhex encoded values.
-
X_B3_PARENT_SPAN_ID
public static final HeaderField X_B3_PARENT_SPAN_ID
B3 ids are fixed-length lowerhex encoded values.
-
X_REQUEST_ID
public static final HeaderField X_REQUEST_ID
The X-RequestId Header-Field MUST be a combination of a globally unique value in the format of a GUID followed by an increasing decimal counter which MUST increase with every new HTTP-Request (for example, "{E2EA6C1C-E61B-49E9-9CFB-38184F907552}:123456"). The GUID portion of the X-RequestId header MUST be unique across all Session Contexts and MUST NOT change for the life of the Session Context. The client MUST send this header on every request and the server MUST return this header with the same information in the response back to the client.- See Also:
- "https://msdn.microsoft.com/en-us/library/dn530858(v=exchg.80).aspx"
-
SCOPE
public static final HeaderField SCOPE
OAuth scopes let you specify exactly how your application needs to access a user's resource. Scope is specified on either the authorization or token endpoints using the parameter scope. Scope is expressed as a set of case-sensitive and space-delimited strings. The authorization server may override the scope request, in this case it must include scope in its response to inform a client of their actual scope. When a scope is not specified, the server may either fallback to a well-documented default, or fail the request.
-
ACCESS_TOKEN
public static final HeaderField ACCESS_TOKEN
The access token, see alsoTokenType
.
-
REFRESH_TOKEN
public static final HeaderField REFRESH_TOKEN
-
TOKEN_TYPE
public static final HeaderField TOKEN_TYPE
Token type, see alsoTokenType
.
-
EXPIRES_IN
public static final HeaderField EXPIRES_IN
-
-
Method Detail
-
values
public static HeaderField[] 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 (HeaderField c : HeaderField.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HeaderField 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
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceorg.refcodes.mixin.NameAccessor
-
toHeaderField
public static HeaderField toHeaderField(java.lang.String aHttpHeaderField)
Retrieves theHeaderField
which corresponds to the given HTTP Header-Field name. The provided HTTP Header-Field name is tested case insensitive.- Parameters:
aHttpHeaderField
- The HTTP Header-Field name for which to get a unifiedHeaderField
.- Returns:
- Returns the according
HeaderField
or null if none suchHeaderField
has yet been defined.
-
toHttpHeaderField
public static java.lang.String toHttpHeaderField(java.lang.String aHttpHeaderField)
Normalizes the input HTTP Header-Field to match the case of the Header-Fields as defined in thisHeaderField
enumeration. If there is none such corresponding Header-Field, then the provided Header-Field is returned as is.- Parameters:
aHttpHeaderField
- The incoming Header-Field to be normalized.- Returns:
- The normalized HeaderF-Field or, if not possible, the unmodified Header-Field-
-
-