|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.abdera.protocol.util.AbstractMessage org.apache.abdera.protocol.util.AbstractRequest org.apache.abdera.protocol.client.RequestOptions
public class RequestOptions
The RequestOptions class allows a variety of options affecting the execution of the request to be modified.
Field Summary |
---|
Fields inherited from class org.apache.abdera.protocol.util.AbstractRequest |
---|
max_stale, min_fresh |
Fields inherited from class org.apache.abdera.protocol.util.AbstractMessage |
---|
flags, max_age |
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants |
---|
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE |
Constructor Summary | |
---|---|
RequestOptions()
|
|
RequestOptions(boolean no_cache)
Create the RequestOptions object |
|
RequestOptions(Date ifModifiedSince)
Create the RequestOptions object with the specified If-Modified-Since header value |
|
RequestOptions(Date ifModifiedSince,
String... ifNoneMatch)
Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values |
|
RequestOptions(Date ifModifiedSince,
String ifNoneMatch)
Create the RequestOptions object with the specified If-Modified-Since and If-None-Match header values |
|
RequestOptions(String... ifNoneMatch)
Create the RequestOptions object with the specified If-None-Match header value |
|
RequestOptions(String ifNoneMatch)
Create the RequestOptions object with the specified If-None-Match header value |
Method Summary | |
---|---|
RequestOptions |
addDateHeader(String header,
Date value)
Similar to setDateHeader but allows for multiple instances of the specified header |
RequestOptions |
addEncodedHeader(String header,
String charset,
String... values)
Similar to setEncodedHeader, but allows for multiple instances of the specified header |
RequestOptions |
addEncodedHeader(String header,
String charset,
String value)
Similar to setEncodedHeader, but allows for multiple instances of the specified header |
RequestOptions |
addHeader(String header,
String... values)
Similar to setHeader but allows for multiple instances of the specified header |
RequestOptions |
addHeader(String header,
String value)
Similar to setHeader but allows for multiple instances of the specified header |
String |
getCacheControl()
Return the value of the Cache-Control header |
Date |
getDateHeader(String header)
Returns the date value of the specified header |
String |
getHeader(String header)
Returns the text value of the specified header |
String[] |
getHeaderNames()
Returns a listing of header names |
String[] |
getHeaders(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(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(String... accept)
Sets the value of the HTTP Accept header |
RequestOptions |
setAccept(String accept)
Sets the value of the HTTP Accept header |
RequestOptions |
setAcceptCharset(String... accept)
Sets the value of the HTTP Accept-Charset header |
RequestOptions |
setAcceptCharset(String accept)
Sets the value of the HTTP Accept-Charset header |
RequestOptions |
setAcceptEncoding(String... accept)
Sets the value of the HTTP Accept-Encoding header |
RequestOptions |
setAcceptEncoding(String accept)
Sets the value of the HTTP Accept-Encoding header |
RequestOptions |
setAcceptLanguage(Locale... locales)
|
RequestOptions |
setAcceptLanguage(Locale locale)
|
RequestOptions |
setAcceptLanguage(String... accept)
Sets the value of the HTTP Accept-Language header |
RequestOptions |
setAcceptLanguage(String accept)
Sets the value of the HTTP Accept-Language header |
RequestOptions |
setAuthorization(String auth)
Set the value of the HTTP Authorization header |
RequestOptions |
setCacheControl(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(String iri)
|
RequestOptions |
setContentType(javax.activation.MimeType value)
Set the value of the HTTP Content-Type header |
RequestOptions |
setContentType(String value)
Set the value of the HTTP Content-Type header |
RequestOptions |
setDateHeader(String header,
Date value)
Set the date value of the specified HTTP header |
RequestOptions |
setEncodedHeader(String header,
String charset,
String... values)
Set the values of a header using proper encoding of non-ascii characters |
RequestOptions |
setEncodedHeader(String header,
String charset,
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(String header,
String... values)
Set the value of the specified HTTP header |
RequestOptions |
setHeader(String header,
String value)
Set the value of the specified HTTP header |
RequestOptions |
setIfMatch(org.apache.abdera.util.EntityTag... entity_tags)
Sets the value of the HTTP If-Match header |
RequestOptions |
setIfMatch(org.apache.abdera.util.EntityTag entity_tag)
Sets the value of the HTTP If-Match header |
RequestOptions |
setIfMatch(String... entity_tags)
Sets the value of the HTTP If-Match header |
RequestOptions |
setIfMatch(String entity_tag)
Sets the value of the HTTP If-Match header |
RequestOptions |
setIfModifiedSince(Date date)
Sets the value of the HTTP If-Modified-Since header |
RequestOptions |
setIfNoneMatch(org.apache.abdera.util.EntityTag... entity_tags)
Sets the value of the HTTP If-None-Match header |
RequestOptions |
setIfNoneMatch(org.apache.abdera.util.EntityTag entity_tag)
Sets the value of the HTTP If-None-Match header |
RequestOptions |
setIfNoneMatch(String... entity_tags)
Sets the value of the HTTP If-None-Match header |
RequestOptions |
setIfNoneMatch(String entity_tag)
Sets the value of the HTTP If-None-Match header |
RequestOptions |
setIfUnmodifiedSince(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(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 |
Methods inherited from class org.apache.abdera.protocol.util.AbstractRequest |
---|
getAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCached, setMaxAge, setMaxStale, setMinFresh, setNoCache, setNoStore, setNoTransform, setOnlyIfCached |
Methods inherited from class org.apache.abdera.protocol.util.AbstractMessage |
---|
check, getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform, toggle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.abdera.protocol.Request |
---|
getAccept, getAcceptCharset, getAcceptEncoding, getAcceptLanguage, getAuthorization, getIfMatch, getIfModifiedSince, getIfNoneMatch, getIfUnmodifiedSince, getMaxStale, getMinFresh, isOnlyIfCached |
Methods inherited from interface org.apache.abdera.protocol.Message |
---|
getContentLanguage, getContentLocation, getContentType, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform |
Constructor Detail |
---|
public RequestOptions()
public RequestOptions(Date ifModifiedSince)
ifModifiedSince
- public RequestOptions(String ifNoneMatch)
IfNoneMatch
- public RequestOptions(String... ifNoneMatch)
IfNoneMatch
- public RequestOptions(Date ifModifiedSince, String ifNoneMatch)
ifModifiedSince
- IfNoneMatch
- public RequestOptions(Date ifModifiedSince, String... ifNoneMatch)
ifModifiedSince
- IfNoneMatch
- public RequestOptions(boolean no_cache)
no_cache
- True if the request will indicate that cached responses should not be returnedMethod Detail |
---|
public boolean getUseLocalCache()
public RequestOptions setUseLocalCache(boolean use_cache)
public RequestOptions setContentType(String value)
public RequestOptions setContentLocation(String iri)
public RequestOptions setContentType(javax.activation.MimeType value)
public RequestOptions setAuthorization(String auth)
public RequestOptions setEncodedHeader(String header, String charset, String value)
public RequestOptions setEncodedHeader(String header, String charset, String... values)
public RequestOptions setHeader(String header, String value)
public RequestOptions setHeader(String header, String... values)
public RequestOptions setDateHeader(String header, Date value)
public RequestOptions addEncodedHeader(String header, String charset, String value)
public RequestOptions addEncodedHeader(String header, String charset, String... values)
public RequestOptions addHeader(String header, String value)
public RequestOptions addHeader(String header, String... values)
public RequestOptions addDateHeader(String header, Date value)
public String getHeader(String header)
getHeader
in interface Message
public String[] getHeaders(String header)
getHeaders
in interface Message
public Date getDateHeader(String header)
getDateHeader
in interface Message
public String[] getHeaderNames()
getHeaderNames
in interface Message
public RequestOptions setIfMatch(String entity_tag)
public RequestOptions setIfMatch(org.apache.abdera.util.EntityTag entity_tag)
public RequestOptions setIfMatch(org.apache.abdera.util.EntityTag... entity_tags)
public RequestOptions setIfMatch(String... entity_tags)
public RequestOptions setIfNoneMatch(String entity_tag)
public RequestOptions setIfNoneMatch(org.apache.abdera.util.EntityTag entity_tag)
public RequestOptions setIfNoneMatch(org.apache.abdera.util.EntityTag... entity_tags)
public RequestOptions setIfNoneMatch(String... entity_tags)
public RequestOptions setIfModifiedSince(Date date)
public RequestOptions setIfUnmodifiedSince(Date date)
public RequestOptions setAccept(String accept)
public RequestOptions setAccept(String... accept)
public RequestOptions setAcceptLanguage(Locale locale)
public RequestOptions setAcceptLanguage(Locale... locales)
public RequestOptions setAcceptLanguage(String accept)
public RequestOptions setAcceptLanguage(String... accept)
public RequestOptions setAcceptCharset(String accept)
public RequestOptions setAcceptCharset(String... accept)
public RequestOptions setAcceptEncoding(String accept)
public RequestOptions setAcceptEncoding(String... accept)
public RequestOptions setSlug(String slug)
public RequestOptions setCacheControl(String cc)
public RequestOptions removeHeaders(String name)
public String getCacheControl()
getCacheControl
in interface Message
getCacheControl
in class AbstractMessage
public 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |