java.lang.IllegalStateException if called outside the scope of a request (e.g. from a provider constructor).
Context
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | COOKIE
See IETF RFC 2109. |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | LAST_EVENT_ID_HEADER
|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if and only if a header with the given name exists, having either a whitespace-trimmed value
matching the predicate, or having at least one whitespace-trimmed single value in a token-separated list of single values.the message header. name, String Regular expression that separates the header value into single values.
valueSeparatorRegex, Predicate<String> null does not split.value must fulfil this predicate. valuePredicate)Checks whether a header with a specific name and value (or item of the token-separated value list) exists. |
| public default boolean | Returns: true if and only if a header with the given name exists, having either a whitespace-trimmed value
matching the predicate, or having at least one whitespace-trimmed single value in a comma-separated list of single values.the message header. name, Predicate<String> value must fulfil this predicate. valuePredicate)Checks whether a header with a specific name and value (or item of the comma-separated value list) exists. |
| public List | Returns: a read-only list of acceptable languages sorted according to their q-value, with highest preference first.Get a list of languages that are acceptable for the response. |
| public List | Returns: a read-only list of requested response media types sorted according to their q-value, with highest preference first.Get a list of media types that are acceptable for the response. |
| public Map | Returns: a read-only map of cookie name (String) to Cookie.Get any cookies that accompanied the request. |
| public Date | |
| public String | Returns: the HTTP header value. If the HTTP header is not present thennull is returned. If the HTTP header is
present but has no value then the empty string is returned. If the HTTP header is present more than once then the
values of joined together and separated by a ',' character.the HTTP header. name)Get a HTTP header as a single string value. |
| public Locale | Returns: the language of the entity ornull if not specified.Get the language of the request entity. |
| public int | Returns: Content-Length as integer if present and valid number. In other cases returns -1.Get Content-Length value. |
| public MediaType | Returns: the media type ornull if there is no request entity.Get the media type of the request entity. |
| public List | Returns: a read-only list of header values if the specified header exists, otherwisenull.the header name, case insensitive. name)Get the values of a HTTP request header if the header exists on the current request. |
| public MultivaluedMap | Returns: a read-only map of header names and values.Get the values of HTTP request headers. |
| ACCEPT | back to summary |
|---|---|
| public static final String ACCEPT | |
| ACCEPT_CHARSET | back to summary |
|---|---|
| public static final String ACCEPT_CHARSET | |
| ACCEPT_ENCODING | back to summary |
|---|---|
| public static final String ACCEPT_ENCODING | |
| ACCEPT_LANGUAGE | back to summary |
|---|---|
| public static final String ACCEPT_LANGUAGE | |
| ALLOW | back to summary |
|---|---|
| public static final String ALLOW | |
| AUTHORIZATION | back to summary |
|---|---|
| public static final String AUTHORIZATION | |
| CACHE_CONTROL | back to summary |
|---|---|
| public static final String CACHE_CONTROL | |
| CONTENT_DISPOSITION | back to summary |
|---|---|
| public static final String CONTENT_DISPOSITION See IETF RFC-2183. | |
| CONTENT_ENCODING | back to summary |
|---|---|
| public static final String CONTENT_ENCODING | |
| CONTENT_ID | back to summary |
|---|---|
| public static final String CONTENT_ID See IETF RFC-2392. | |
| CONTENT_LANGUAGE | back to summary |
|---|---|
| public static final String CONTENT_LANGUAGE | |
| CONTENT_LENGTH | back to summary |
|---|---|
| public static final String CONTENT_LENGTH | |
| CONTENT_LOCATION | back to summary |
|---|---|
| public static final String CONTENT_LOCATION | |
| CONTENT_TYPE | back to summary |
|---|---|
| public static final String CONTENT_TYPE | |
| COOKIE | back to summary |
|---|---|
| public static final String COOKIE See IETF RFC 2109. | |
| DATE | back to summary |
|---|---|
| public static final String DATE | |
| ETAG | back to summary |
|---|---|
| public static final String ETAG | |
| EXPECT | back to summary |
|---|---|
| public static final String EXPECT | |
| EXPIRES | back to summary |
|---|---|
| public static final String EXPIRES | |
| HOST | back to summary |
|---|---|
| public static final String HOST | |
| IF_MATCH | back to summary |
|---|---|
| public static final String IF_MATCH | |
| IF_MODIFIED_SINCE | back to summary |
|---|---|
| public static final String IF_MODIFIED_SINCE | |
| IF_NONE_MATCH | back to summary |
|---|---|
| public static final String IF_NONE_MATCH | |
| IF_UNMODIFIED_SINCE | back to summary |
|---|---|
| public static final String IF_UNMODIFIED_SINCE | |
| LAST_EVENT_ID_HEADER | back to summary |
|---|---|
| public static final String LAST_EVENT_ID_HEADER
| |
| LAST_MODIFIED | back to summary |
|---|---|
| public static final String LAST_MODIFIED | |
| LINK | back to summary |
|---|---|
| public static final String LINK | |
| LOCATION | back to summary |
|---|---|
| public static final String LOCATION | |
| RETRY_AFTER | back to summary |
|---|---|
| public static final String RETRY_AFTER | |
| SET_COOKIE | back to summary |
|---|---|
| public static final String SET_COOKIE See IETF RFC 2109. | |
| USER_AGENT | back to summary |
|---|---|
| public static final String USER_AGENT | |
| VARY | back to summary |
|---|---|
| public static final String VARY | |
| WWW_AUTHENTICATE | back to summary |
|---|---|
| public static final String WWW_AUTHENTICATE | |
| containsHeaderString | back to summary |
|---|---|
| public boolean containsHeaderString(String name, String valueSeparatorRegex, Predicate<String> valuePredicate) Checks whether a header with a specific name and value (or item of the token-separated value list) exists.
Each single non-string header value is converted to String using a
For example:
| |
| containsHeaderString | back to summary |
|---|---|
| public default boolean containsHeaderString(String name, Predicate<String> valuePredicate) Checks whether a header with a specific name and value (or item of the comma-separated value list) exists.
Each single non-string header value is converted to String using a
For example:
| |
| getAcceptableLanguages | back to summary |
|---|---|
| public List Get a list of languages that are acceptable for the response. If no acceptable languages are specified, a read-only list containing a single wildcardjava.
instance (with language field set to "*") is returned.
| |
| getAcceptableMediaTypes | back to summary |
|---|---|
| public List Get a list of media types that are acceptable for the response. If no acceptable media types are specified, a read-only list containing a singlewildcard media type instance is returned.
| |
| getCookies | back to summary |
|---|---|
| public Map Get any cookies that accompanied the request.
| |
| getDate | back to summary |
|---|---|
| public Date getDate() Get message date.
| |
| getHeaderString | back to summary |
|---|---|
| public String getHeaderString(String name) Get a HTTP header as a single string value. Each single non-string header value is converted to String using ajakarta. if one
is available via jakarta. for the header value
class or using its toString method if a header delegate is not available.
| |
| getLanguage | back to summary |
|---|---|
| public Locale getLanguage() Get the language of the request entity.
| |
| getLength | back to summary |
|---|---|
| public int getLength() Get Content-Length value.
| |
| getMediaType | back to summary |
|---|---|
| public MediaType getMediaType() Get the media type of the request entity.
| |
| getRequestHeader | back to summary |
|---|---|
| public List Get the values of a HTTP request header if the header exists on the current request. The returned value will be
a read-only List if the specified header exists or
| |
| getRequestHeaders | back to summary |
|---|---|
| public MultivaluedMap Get the values of HTTP request headers. The returned Map is case-insensitive wrt. keys and is read-only. The method
never returns
| |