|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shindig.common.servlet.HttpUtil
public final class HttpUtil
Collection of HTTP utilities
| Field Summary | |
|---|---|
static String |
ACCESS_CONTROL_ALLOW_ORIGIN_HEADER
|
| Method Summary | |
|---|---|
static List<Pair<String,String>> |
getCachingHeadersToSet(int ttl,
boolean noProxy)
|
static int |
getDefaultTtl()
|
static TimeSource |
getTimeSource()
|
static boolean |
isJSONP(javax.servlet.http.HttpServletRequest request)
|
static void |
setCachingHeaders(javax.servlet.http.HttpServletResponse response)
Sets HTTP headers that instruct the browser to cache content. |
static void |
setCachingHeaders(javax.servlet.http.HttpServletResponse response,
boolean noProxy)
Sets HTTP headers that instruct the browser to cache content. |
static void |
setCachingHeaders(javax.servlet.http.HttpServletResponse response,
int ttl)
Sets HTTP headers that instruct the browser to cache content. |
static void |
setCachingHeaders(javax.servlet.http.HttpServletResponse response,
int ttl,
boolean noProxy)
Sets HTTP headers that instruct the browser to cache content. |
static void |
setCORSheader(javax.servlet.http.HttpServletResponse resp,
Collection<String> validOrigins)
Set the header for Cross-Site Resource Sharing. |
static void |
setDefaultTtl(int defaultTtl)
|
static void |
setNoCache(javax.servlet.http.HttpServletResponse response)
|
static void |
setTimeSource(TimeSource timeSource)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER
| Method Detail |
|---|
public static void setTimeSource(TimeSource timeSource)
public static TimeSource getTimeSource()
public static void setCachingHeaders(javax.servlet.http.HttpServletResponse response)
response - The HTTP response
public static void setCachingHeaders(javax.servlet.http.HttpServletResponse response,
boolean noProxy)
response - The HTTP responsenoProxy - True if you don't want the response to be cacheable by proxies.
public static void setCachingHeaders(javax.servlet.http.HttpServletResponse response,
int ttl)
response - The HTTP responsettl - The time to cache for, in seconds. If 0, then insure that
this object is not cached.public static void setNoCache(javax.servlet.http.HttpServletResponse response)
public static void setCachingHeaders(javax.servlet.http.HttpServletResponse response,
int ttl,
boolean noProxy)
response - The HTTP responsettl - The time to cache for, in seconds. If 0, then insure that
this object is not cached.noProxy - True if you don't want the response to be cacheable by proxies.
public static List<Pair<String,String>> getCachingHeadersToSet(int ttl,
boolean noProxy)
public static int getDefaultTtl()
public static void setDefaultTtl(int defaultTtl)
public static boolean isJSONP(javax.servlet.http.HttpServletRequest request)
throws IllegalArgumentException
IllegalArgumentException
public static void setCORSheader(javax.servlet.http.HttpServletResponse resp,
Collection<String> validOrigins)
resp - HttpServletResponse to modifyvalidOrigins - a space separated list of Origins as defined by the html5 spechttp://dev.w3.org/html5/spec/browsers.html#origin-0
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||