org.jboss.resteasy.specimpl
Class HttpHeadersImpl

java.lang.Object
  extended by org.jboss.resteasy.specimpl.HttpHeadersImpl
All Implemented Interfaces:
HttpHeaders

public class HttpHeadersImpl
extends java.lang.Object
implements HttpHeaders

Version:
$Revision: 1 $
Author:
Bill Burke

Field Summary
 
Fields inherited from interface javax.ws.rs.core.HttpHeaders
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, AUTHORIZATION, CACHE_CONTROL, CONTENT_ENCODING, 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, LOCATION, SET_COOKIE, USER_AGENT, VARY, WWW_AUTHENTICATE
 
Constructor Summary
HttpHeadersImpl()
           
 
Method Summary
 java.util.List<java.util.Locale> getAcceptableLanguages()
          Get a list of languages that are acceptable for the response.
 java.util.List<MediaType> getAcceptableMediaTypes()
          Get a list of media types that are acceptable for the response.
 java.util.Map<java.lang.String,Cookie> getCookies()
          Get any cookies that accompanied the request.
 java.util.Locale getLanguage()
          Get the language of the request entity
 MediaType getMediaType()
          Get the media type of the request entity
 java.util.List<java.lang.String> getRequestHeader(java.lang.String name)
          Get the values of a HTTP request header.
 MultivaluedMap<java.lang.String,java.lang.String> getRequestHeaders()
          Get the values of HTTP request headers.
 void setAcceptableLanguages(java.util.List<java.lang.String> acceptableLanguages)
           
 void setAcceptableMediaTypes(java.util.List<MediaType> acceptableMediaTypes)
           
 void setCookies(java.util.Map<java.lang.String,Cookie> cookies)
           
 void setLanguage(java.lang.String language)
           
 void setMediaType(MediaType mediaType)
           
 void setRequestHeaders(MultivaluedMap<java.lang.String,java.lang.String> requestHeaders)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeadersImpl

public HttpHeadersImpl()
Method Detail

getRequestHeaders

public MultivaluedMap<java.lang.String,java.lang.String> getRequestHeaders()
Description copied from interface: HttpHeaders
Get the values of HTTP request headers. The returned Map is case-insensitive wrt keys and is read-only.

Specified by:
getRequestHeaders in interface HttpHeaders
Returns:
a read-only map of header names and values.

setRequestHeaders

public void setRequestHeaders(MultivaluedMap<java.lang.String,java.lang.String> requestHeaders)

getAcceptableMediaTypes

public java.util.List<MediaType> getAcceptableMediaTypes()
Description copied from interface: HttpHeaders
Get a list of media types that are acceptable for the response.

Specified by:
getAcceptableMediaTypes in interface HttpHeaders
Returns:
a read-only list of requested response media types sorted according to their q-value, with highest preference first.

setAcceptableMediaTypes

public void setAcceptableMediaTypes(java.util.List<MediaType> acceptableMediaTypes)

getMediaType

public MediaType getMediaType()
Description copied from interface: HttpHeaders
Get the media type of the request entity

Specified by:
getMediaType in interface HttpHeaders
Returns:
the media type or null if there is no request entity.

setMediaType

public void setMediaType(MediaType mediaType)

getLanguage

public java.util.Locale getLanguage()
Description copied from interface: HttpHeaders
Get the language of the request entity

Specified by:
getLanguage in interface HttpHeaders
Returns:
the language of the entity or null if not specified

setLanguage

public void setLanguage(java.lang.String language)

setAcceptableLanguages

public void setAcceptableLanguages(java.util.List<java.lang.String> acceptableLanguages)

getCookies

public java.util.Map<java.lang.String,Cookie> getCookies()
Description copied from interface: HttpHeaders
Get any cookies that accompanied the request.

Specified by:
getCookies in interface HttpHeaders
Returns:
a read-only map of cookie name (String) to Cookie.

setCookies

public void setCookies(java.util.Map<java.lang.String,Cookie> cookies)

getRequestHeader

public java.util.List<java.lang.String> getRequestHeader(java.lang.String name)
Description copied from interface: HttpHeaders
Get the values of a HTTP request header. The returned List is read-only. This is a shortcut for getRequestHeaders().get(name).

Specified by:
getRequestHeader in interface HttpHeaders
Parameters:
name - the header name, case insensitive
Returns:
a read-only list of header values.

getAcceptableLanguages

public java.util.List<java.util.Locale> getAcceptableLanguages()
Description copied from interface: HttpHeaders
Get a list of languages that are acceptable for the response.

Specified by:
getAcceptableLanguages in interface HttpHeaders
Returns:
a read-only list of acceptable languages sorted according to their q-value, with highest preference first.


Copyright © 2010. All Rights Reserved.