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()
HttpHeaders
null
.getRequestHeaders
in interface HttpHeaders
public MultivaluedMap<String,String> getMutableHeaders()
public void testParsing()
public List<String> getRequestHeader(String name)
HttpHeaders
getRequestHeaders().get(name)
.getRequestHeader
in interface HttpHeaders
name
- the header name, case insensitive.public Map<String,Cookie> getCookies()
HttpHeaders
getCookies
in interface HttpHeaders
public Date getDate()
HttpHeaders
getDate
in interface HttpHeaders
null
if not present.public String getHeaderString(String name)
HttpHeaders
RuntimeDelegate.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 HttpHeaders
name
- 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()
HttpHeaders
getLanguage
in interface HttpHeaders
null
if not specified.public int getLength()
HttpHeaders
getLength
in interface HttpHeaders
public MediaType getMediaType()
HttpHeaders
getMediaType
in interface HttpHeaders
null
if there is no request entity.public List<MediaType> getAcceptableMediaTypes()
HttpHeaders
wildcard media type
instance is returned.getAcceptableMediaTypes
in interface HttpHeaders
public List<Locale> getAcceptableLanguages()
HttpHeaders
Locale
instance (with language field
set to "*
") is returned.getAcceptableLanguages
in interface HttpHeaders
Copyright © 2017 JBoss by Red Hat. All rights reserved.