|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openid4java.util.HttpRequestOptions
public class HttpRequestOptions
Container class for the various options associated with HTTP requests.
HttpCache
Constructor Summary | |
---|---|
HttpRequestOptions()
Constructs a set of HTTP request options with the default values. |
|
HttpRequestOptions(HttpRequestOptions other)
Creates a new HttpRequestOptions object as a clone of the provided parameter. |
Method Summary | |
---|---|
void |
addRequestHeader(java.lang.String headerName,
java.lang.String headerValue)
Adds a new HTTP request header. |
boolean |
getAllowCircularRedirects()
|
long |
getCacheTTLSeconds()
Gets the TTL for the cached response in seconds |
int |
getConnTimeout()
Gets the HTTP connect timeout, in milliseconds. |
java.lang.String |
getContentType()
Gets the required content-type for the HTTP response. |
static HttpRequestOptions |
getDefaultOptionsForDiscovery()
Returns an HttpRequestOptions object suitable to use for
HTTP requests to perform discovery. |
static HttpRequestOptions |
getDefaultOptionsForOpCalls()
Returns an HttpRequestOptions object suitable to use for
HTTP requests to OP endpoints for the purpose of creating associations
or verifying signatures. |
int |
getMaxBodySize()
Gets configuration parameter for the maximum HTTP body size that will be downloaded. |
int |
getMaxRedirects()
Gets the internal limit configured for the maximum number of redirects to be followed for the HTTP calls. |
java.util.Map |
getRequestHeaders()
Gets the HTTP request headers that will be used when placing HTTP requests using the options in this object. |
int |
getSocketTimeout()
Gets the HTTP socket (read) timeout, in milliseconds. |
boolean |
isUseCache()
Returns true if a cached copy can be used when placing HTTP requests using the options in this object. |
void |
setAllowCircularRedirects(boolean allow)
|
void |
setCacheTTLSeconds(long ttl)
Sets the TTL for the cached response in seconds |
void |
setConnTimeout(int connTimeout)
Sets the HTTP connect timeout, in milliseconds. |
void |
setContentType(java.lang.String contentType)
Sets the required content-type for the HTTP response. |
void |
setMaxBodySize(int maxBodySize)
Sets the maximum HTTP body size that will be downloaded. |
void |
setMaxRedirects(int maxRedirects)
Sets the maximum number of redirects to be followed for the HTTP calls. |
void |
setRequestHeaders(java.util.Map requestHeaders)
Sets the HTTP request headers that will be used when placing HTTP requests using the options in this object. |
void |
setSocketTimeout(int socketTimeout)
Sets HTTP socket (read) timeout, in milliseconds. |
void |
setUseCache(boolean useCache)
Sets the flag for allowing cached copy to be used when placing HTTP requests using the options in this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpRequestOptions()
public HttpRequestOptions(HttpRequestOptions other)
other
- HttpRequestOptions instance to be cloned.Method Detail |
---|
public static HttpRequestOptions getDefaultOptionsForDiscovery()
HttpRequestOptions
object suitable to use for
HTTP requests to perform discovery.
public static HttpRequestOptions getDefaultOptionsForOpCalls()
HttpRequestOptions
object suitable to use for
HTTP requests to OP endpoints for the purpose of creating associations
or verifying signatures.
public int getConnTimeout()
public void setConnTimeout(int connTimeout)
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
public int getMaxRedirects()
public void setMaxRedirects(int maxRedirects)
public int getMaxBodySize()
public void setMaxBodySize(int maxBodySize)
public java.util.Map getRequestHeaders()
public void setRequestHeaders(java.util.Map requestHeaders)
public void addRequestHeader(java.lang.String headerName, java.lang.String headerValue)
public boolean isUseCache()
public void setUseCache(boolean useCache)
public java.lang.String getContentType()
public void setContentType(java.lang.String contentType)
public boolean getAllowCircularRedirects()
public void setAllowCircularRedirects(boolean allow)
public long getCacheTTLSeconds()
public void setCacheTTLSeconds(long ttl)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |