public class ResteasyHttpHeaders extends Object implements HttpHeaders
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_ID, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPIRES, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LINK, LOCATION, RETRY_AFTER, SET_COOKIE, USER_AGENT, VARY, WWW_AUTHENTICATE| Constructor and Description |
|---|
ResteasyHttpHeaders(MultivaluedMap<String,String> requestHeaders) |
ResteasyHttpHeaders(MultivaluedMap<String,String> requestHeaders,
Map<String,Cookie> cookies) |
| Modifier and Type | Method and Description |
|---|---|
List<Locale> |
getAcceptableLanguages()
Get a list of languages that are acceptable for the response.
|
List<MediaType> |
getAcceptableMediaTypes()
Get a list of media types that are acceptable for the response.
|
Map<String,Cookie> |
getCookies()
Get any cookies that accompanied the request.
|
Date |
getDate()
Get message date.
|
String |
getHeaderString(String name)
Get a HTTP header as a single string value.
|
Locale |
getLanguage()
Get the language of the request entity.
|
int |
getLength()
Get Content-Length value.
|
MediaType |
getMediaType()
Get the media type of the request entity.
|
Map<String,Cookie> |
getMutableCookies() |
MultivaluedMap<String,String> |
getMutableHeaders() |
List<String> |
getRequestHeader(String name)
Get the values of a HTTP request header.
|
MultivaluedMap<String,String> |
getRequestHeaders()
Get the values of HTTP request headers.
|
void |
setCookies(Map<String,Cookie> cookies) |
void |
testParsing() |
public ResteasyHttpHeaders(MultivaluedMap<String,String> requestHeaders)
public MultivaluedMap<String,String> getRequestHeaders()
HttpHeadersnull.getRequestHeaders in interface HttpHeaderspublic MultivaluedMap<String,String> getMutableHeaders()
public void testParsing()
public List<String> getRequestHeader(String name)
HttpHeadersgetRequestHeaders().get(name).getRequestHeader in interface HttpHeadersname - the header name, case insensitive.public Map<String,Cookie> getCookies()
HttpHeadersgetCookies in interface HttpHeaderspublic Date getDate()
HttpHeadersgetDate in interface HttpHeadersnull if not present.public String getHeaderString(String name)
HttpHeadersRuntimeDelegate.HeaderDelegate if one is available
via RuntimeDelegate.createHeaderDelegate(java.lang.Class)
for the header value class or using its toString method if a header
delegate is not available.getHeaderString in interface HttpHeadersname - the HTTP header.null 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.HttpHeaders.getRequestHeader(java.lang.String)public Locale getLanguage()
HttpHeadersgetLanguage in interface HttpHeadersnull if not specified.public int getLength()
HttpHeadersgetLength in interface HttpHeaderspublic MediaType getMediaType()
HttpHeadersgetMediaType in interface HttpHeadersnull if there is no request entity.public List<MediaType> getAcceptableMediaTypes()
HttpHeaderswildcard media type
instance is returned.getAcceptableMediaTypes in interface HttpHeaderspublic List<Locale> getAcceptableLanguages()
HttpHeadersLocale instance (with language field
set to "*") is returned.getAcceptableLanguages in interface HttpHeadersCopyright © 2017 JBoss by Red Hat. All rights reserved.