public class RequestOptions extends AbstractRequest implements Request
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE| Constructor and Description |
|---|
RequestOptions() |
RequestOptions(boolean no_cache)
Create the RequestOptions object
|
RequestOptions(java.util.Date ifModifiedSince)
Create the RequestOptions object with the specified If-Modified-Since header value
|
RequestOptions(java.util.Date ifModifiedSince,
java.lang.String... ifNoneMatch)
Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values
|
RequestOptions(java.util.Date ifModifiedSince,
java.lang.String ifNoneMatch)
Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values
|
RequestOptions(java.lang.String... ifNoneMatch)
Create the RequestOptions object with the specified If-None-Match header value
|
RequestOptions(java.lang.String ifNoneMatch)
Create the RequestOptions object with the specified If-None-Match header value
|
| Modifier and Type | Method and Description |
|---|---|
RequestOptions |
addDateHeader(java.lang.String header,
java.util.Date value)
Similar to setDateHeader but allows for multiple instances of the specified header
|
RequestOptions |
addEncodedHeader(java.lang.String header,
java.lang.String charset,
java.lang.String... values)
Similar to setEncodedHeader, but allows for multiple instances of the
specified header
|
RequestOptions |
addEncodedHeader(java.lang.String header,
java.lang.String charset,
java.lang.String value)
Similar to setEncodedHeader, but allows for multiple instances of the
specified header
|
RequestOptions |
addHeader(java.lang.String header,
java.lang.String... values)
Similar to setHeader but allows for multiple instances of the specified header
|
RequestOptions |
addHeader(java.lang.String header,
java.lang.String value)
Similar to setHeader but allows for multiple instances of the specified header
|
java.lang.String |
getCacheControl()
Return the value of the Cache-Control header
|
java.util.Date |
getDateHeader(java.lang.String header)
Returns the date value of the specified header
|
java.lang.String |
getHeader(java.lang.String header)
Returns the text value of the specified header
|
java.lang.String[] |
getHeaderNames()
Returns a listing of header names
|
java.lang.String[] |
getHeaders(java.lang.String header)
Return a listing of text values for the specified header
|
boolean |
getRevalidateWithAuth()
Configure the AbderaClient Side cache to revalidate when using Authorization
|
boolean |
getUseLocalCache()
The difference between this and getNoCache is that this
only disables the local cache without affecting the
Cache-Control header.
|
boolean |
is4xxRequestException()
Return true if a RequestException should be thrown on 4xx responses
|
boolean |
is5xxRequestException()
Return true if a RequestException should be thrown on 5xx responses
|
boolean |
isConditionalPut()
True if HTTP Conditional Requests should be used automatically.
|
boolean |
isFollowRedirects()
True if the client should follow redirects automatically
|
boolean |
isUseChunked()
Should the request use chunked encoding?
|
boolean |
isUseExpectContinue()
Return true if Expect-Continue should be used
|
boolean |
isUsePostOverride()
Return whether the request should use the X-HTTP-Method-Override option
|
RequestOptions |
removeHeaders(java.lang.String name)
Remove the specified HTTP header
|
RequestOptions |
set4xxRequestException(boolean v)
Set whether or not to throw a RequestExeption on 4xx responses
|
RequestOptions |
set5xxRequestException(boolean v)
Set whether or not to throw a RequestExeption on 5xx responses
|
RequestOptions |
setAccept(java.lang.String... accept)
Sets the value of the HTTP Accept header
|
RequestOptions |
setAccept(java.lang.String accept)
Sets the value of the HTTP Accept header
|
RequestOptions |
setAcceptCharset(java.lang.String... accept)
Sets the value of the HTTP Accept-Charset header
|
RequestOptions |
setAcceptCharset(java.lang.String accept)
Sets the value of the HTTP Accept-Charset header
|
RequestOptions |
setAcceptEncoding(java.lang.String... accept)
Sets the value of the HTTP Accept-Encoding header
|
RequestOptions |
setAcceptEncoding(java.lang.String accept)
Sets the value of the HTTP Accept-Encoding header
|
RequestOptions |
setAcceptLanguage(java.util.Locale... locales) |
RequestOptions |
setAcceptLanguage(java.util.Locale locale) |
RequestOptions |
setAcceptLanguage(java.lang.String... accept)
Sets the value of the HTTP Accept-Language header
|
RequestOptions |
setAcceptLanguage(java.lang.String accept)
Sets the value of the HTTP Accept-Language header
|
RequestOptions |
setAuthorization(java.lang.String auth)
Set the value of the HTTP Authorization header
|
RequestOptions |
setCacheControl(java.lang.String cc)
Sets the value of the HTTP Cache-Control header
|
RequestOptions |
setConditionalPut(boolean conditional)
True if HTTP Conditinal Request should be used automatically.
|
RequestOptions |
setContentLocation(java.lang.String iri) |
RequestOptions |
setContentType(javax.activation.MimeType value)
Set the value of the HTTP Content-Type header
|
RequestOptions |
setContentType(java.lang.String value)
Set the value of the HTTP Content-Type header
|
RequestOptions |
setDateHeader(java.lang.String header,
java.util.Date value)
Set the date value of the specified HTTP header
|
RequestOptions |
setEncodedHeader(java.lang.String header,
java.lang.String charset,
java.lang.String... values)
Set the values of a header using proper encoding of non-ascii characters
|
RequestOptions |
setEncodedHeader(java.lang.String header,
java.lang.String charset,
java.lang.String value)
Set the value of a header using proper encoding of non-ascii characters
|
RequestOptions |
setFollowRedirects(boolean followredirects)
True if the client should follow redirects automatically
|
RequestOptions |
setHeader(java.lang.String header,
java.lang.String... values)
Set the value of the specified HTTP header
|
RequestOptions |
setHeader(java.lang.String header,
java.lang.String value)
Set the value of the specified HTTP header
|
RequestOptions |
setIfMatch(EntityTag... entity_tags)
Sets the value of the HTTP If-Match header
|
RequestOptions |
setIfMatch(EntityTag entity_tag)
Sets the value of the HTTP If-Match header
|
RequestOptions |
setIfMatch(java.lang.String... entity_tags)
Sets the value of the HTTP If-Match header
|
RequestOptions |
setIfMatch(java.lang.String entity_tag)
Sets the value of the HTTP If-Match header
|
RequestOptions |
setIfModifiedSince(java.util.Date date)
Sets the value of the HTTP If-Modified-Since header
|
RequestOptions |
setIfNoneMatch(EntityTag... entity_tags)
Sets the value of the HTTP If-None-Match header
|
RequestOptions |
setIfNoneMatch(EntityTag entity_tag)
Sets the value of the HTTP If-None-Match header
|
RequestOptions |
setIfNoneMatch(java.lang.String... entity_tags)
Sets the value of the HTTP If-None-Match header
|
RequestOptions |
setIfNoneMatch(java.lang.String entity_tag)
Sets the value of the HTTP If-None-Match header
|
RequestOptions |
setIfUnmodifiedSince(java.util.Date date)
Sets the value of the HTTP If-Unmodified-Since header
|
RequestOptions |
setRevalidateWithAuth(boolean revalidateAuth)
Configure the AbderaClient Side cache to revalidate when using Authorization
|
RequestOptions |
setSlug(java.lang.String slug)
Sets the value of the Atom Publishing Protocol Slug header
|
RequestOptions |
setUseChunked(boolean useChunked)
Set whether the request should use chunked encoding.
|
RequestOptions |
setUseExpectContinue(boolean useExpect)
Set whether or not to use the HTTP Expect-Continue mechanism
(enabled by default)
|
RequestOptions |
setUseLocalCache(boolean use_cache)
True if the local client cache should be used
|
RequestOptions |
setUsePostOverride(boolean useOverride)
Set whether the request should use the X-HTTP-Method-Override option
|
getAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCached, setMaxAge, setMaxStale, setMinFresh, setNoCache, setNoStore, setNoTransform, setOnlyIfCachedgetContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransformequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCachedgetContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransformpublic RequestOptions()
public RequestOptions(java.util.Date ifModifiedSince)
ifModifiedSince - public RequestOptions(java.lang.String ifNoneMatch)
IfNoneMatch - public RequestOptions(java.lang.String... ifNoneMatch)
IfNoneMatch - public RequestOptions(java.util.Date ifModifiedSince,
java.lang.String ifNoneMatch)
ifModifiedSince - IfNoneMatch - public RequestOptions(java.util.Date ifModifiedSince,
java.lang.String... ifNoneMatch)
ifModifiedSince - IfNoneMatch - public RequestOptions(boolean no_cache)
no_cache - True if the request will indicate that cached responses should not be returnedpublic boolean getUseLocalCache()
public RequestOptions setUseLocalCache(boolean use_cache)
public RequestOptions setContentType(java.lang.String value)
public RequestOptions setContentLocation(java.lang.String iri)
public RequestOptions setContentType(javax.activation.MimeType value)
public RequestOptions setAuthorization(java.lang.String auth)
public RequestOptions setEncodedHeader(java.lang.String header, java.lang.String charset, java.lang.String value)
public RequestOptions setEncodedHeader(java.lang.String header, java.lang.String charset, java.lang.String... values)
public RequestOptions setHeader(java.lang.String header, java.lang.String value)
public RequestOptions setHeader(java.lang.String header, java.lang.String... values)
public RequestOptions setDateHeader(java.lang.String header, java.util.Date value)
public RequestOptions addEncodedHeader(java.lang.String header, java.lang.String charset, java.lang.String value)
public RequestOptions addEncodedHeader(java.lang.String header, java.lang.String charset, java.lang.String... values)
public RequestOptions addHeader(java.lang.String header, java.lang.String value)
public RequestOptions addHeader(java.lang.String header, java.lang.String... values)
public RequestOptions addDateHeader(java.lang.String header, java.util.Date value)
public java.lang.String getHeader(java.lang.String header)
public java.lang.String[] getHeaders(java.lang.String header)
getHeaders in interface Messagepublic java.util.Date getDateHeader(java.lang.String header)
getDateHeader in interface Messagepublic java.lang.String[] getHeaderNames()
getHeaderNames in interface Messagepublic RequestOptions setIfMatch(java.lang.String entity_tag)
public RequestOptions setIfMatch(EntityTag entity_tag)
public RequestOptions setIfMatch(EntityTag... entity_tags)
public RequestOptions setIfMatch(java.lang.String... entity_tags)
public RequestOptions setIfNoneMatch(java.lang.String entity_tag)
public RequestOptions setIfNoneMatch(EntityTag entity_tag)
public RequestOptions setIfNoneMatch(EntityTag... entity_tags)
public RequestOptions setIfNoneMatch(java.lang.String... entity_tags)
public RequestOptions setIfModifiedSince(java.util.Date date)
public RequestOptions setIfUnmodifiedSince(java.util.Date date)
public RequestOptions setAccept(java.lang.String accept)
public RequestOptions setAccept(java.lang.String... accept)
public RequestOptions setAcceptLanguage(java.util.Locale locale)
public RequestOptions setAcceptLanguage(java.util.Locale... locales)
public RequestOptions setAcceptLanguage(java.lang.String accept)
public RequestOptions setAcceptLanguage(java.lang.String... accept)
public RequestOptions setAcceptCharset(java.lang.String accept)
public RequestOptions setAcceptCharset(java.lang.String... accept)
public RequestOptions setAcceptEncoding(java.lang.String accept)
public RequestOptions setAcceptEncoding(java.lang.String... accept)
public RequestOptions setSlug(java.lang.String slug)
public RequestOptions setCacheControl(java.lang.String cc)
public RequestOptions removeHeaders(java.lang.String name)
public java.lang.String getCacheControl()
getCacheControl in interface MessagegetCacheControl in class AbstractMessagepublic boolean getRevalidateWithAuth()
public RequestOptions setRevalidateWithAuth(boolean revalidateAuth)
public boolean isUseChunked()
public RequestOptions setUseChunked(boolean useChunked)
public RequestOptions setUsePostOverride(boolean useOverride)
public boolean isUsePostOverride()
public RequestOptions set4xxRequestException(boolean v)
public boolean is4xxRequestException()
public RequestOptions set5xxRequestException(boolean v)
public boolean is5xxRequestException()
public RequestOptions setUseExpectContinue(boolean useExpect)
public boolean isUseExpectContinue()
public boolean isConditionalPut()
public RequestOptions setConditionalPut(boolean conditional)
public boolean isFollowRedirects()
public RequestOptions setFollowRedirects(boolean followredirects)
Copyright © 2010 - 2019 Adobe. All Rights Reserved