org.glassfish.jersey.internal.inject
Class HttpHeadersInjectee

java.lang.Object
  extended by org.glassfish.jersey.internal.inject.HttpHeadersInjectee
All Implemented Interfaces:
HttpHeaders

public class HttpHeadersInjectee
extends Object
implements HttpHeaders

Proxiable wrapper for request scoped HttpHeaders instance.

Author:
Jakub Podlesak (jakub.podlesak at oracle.com)

Field Summary
 
Fields inherited from interface javax.ws.rs.core.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 Summary
HttpHeadersInjectee()
           
 
Method Summary
 List<Locale> getAcceptableLanguages()
           
 List<MediaType> getAcceptableMediaTypes()
           
 Map<String,Cookie> getCookies()
           
 Date getDate()
           
 String getHeaderString(String name)
           
 Locale getLanguage()
           
 int getLength()
           
 MediaType getMediaType()
           
 List<String> getRequestHeader(String name)
           
 MultivaluedMap<String,String> getRequestHeaders()
           
 void set(HttpHeaders httpHeaders)
          Set wrapped instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHeadersInjectee

public HttpHeadersInjectee()
Method Detail

set

public void set(HttpHeaders httpHeaders)
Set wrapped instance. Should be invoked on each incoming request, when a new injectee instance is created by HK2.

Parameters:
httpHeaders - actual HttpHeaders instance.

getRequestHeader

public List<String> getRequestHeader(String name)
Specified by:
getRequestHeader in interface HttpHeaders

getHeaderString

public String getHeaderString(String name)
Specified by:
getHeaderString in interface HttpHeaders

getRequestHeaders

public MultivaluedMap<String,String> getRequestHeaders()
Specified by:
getRequestHeaders in interface HttpHeaders

getAcceptableMediaTypes

public List<MediaType> getAcceptableMediaTypes()
Specified by:
getAcceptableMediaTypes in interface HttpHeaders

getAcceptableLanguages

public List<Locale> getAcceptableLanguages()
Specified by:
getAcceptableLanguages in interface HttpHeaders

getMediaType

public MediaType getMediaType()
Specified by:
getMediaType in interface HttpHeaders

getLanguage

public Locale getLanguage()
Specified by:
getLanguage in interface HttpHeaders

getCookies

public Map<String,Cookie> getCookies()
Specified by:
getCookies in interface HttpHeaders

getDate

public Date getDate()
Specified by:
getDate in interface HttpHeaders

getLength

public int getLength()
Specified by:
getLength in interface HttpHeaders


Copyright © 2007-2013 Oracle Corporation. All Rights Reserved. Use is subject to license terms.