|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.sca.binding.http.HTTPCacheContext
public class HTTPCacheContext
A class to store cache settings for Atom and HTTP requests and responses. Predicates are statements that work in conjunction with ETags and LastModified dates to determine if a precondition or postcondition is satisfied. See HTTP specification for how predicates wrk: http://tools.ietf.org/html/rfc2616 Example predicates in HTTP include If-Match, If-None-Match, If-Modified-Since, If-Unmodified-Since, If-Range.
Field Summary | |
---|---|
boolean |
enabled
|
java.lang.String |
eTag
|
boolean |
ifMatch
|
boolean |
ifModifiedSince
|
boolean |
ifNoneMatch
|
boolean |
ifRange
|
boolean |
ifUnmodifiedSince
|
java.lang.String |
lastModified
|
java.util.Date |
lastModifiedDate
|
static java.text.SimpleDateFormat |
RFC822DateFormat
|
Constructor Summary | |
---|---|
HTTPCacheContext()
|
Method Summary | |
---|---|
static HTTPCacheContext |
getCacheContextFromRequest(HttpServletRequest request)
Gets the cache context information (ETag, LastModified, predicates) from the Http request. |
java.lang.String |
getETag()
An ETag is a unique ID for an item. |
java.lang.String |
getLastModified()
The LastModified date is the time the item was last changed. |
java.util.Date |
getLastModifiedAsDate()
The LastModified date is the time the item was last changed. |
boolean |
isEnabled()
Enabled is true whenever ETag, LastModified, or predicate is set. |
boolean |
isIfMatch()
|
boolean |
isIfModifiedSince()
|
boolean |
isIfNoneMatch()
|
boolean |
isIfRange()
|
boolean |
isIfUnmodifiedSince()
|
void |
setEnabled(boolean enabled)
|
void |
setETag(java.lang.String tag)
|
void |
setIfMatch(boolean ifMatch)
|
void |
setIfModifiedSince(boolean ifModifiedSince)
|
void |
setIfNoneMatch(boolean ifNoneMatch)
|
void |
setIfRange(boolean ifRange)
|
void |
setIfUnmodifiedSince(boolean ifUnmodifiedSince)
|
void |
setLastModified(java.util.Date updated)
|
void |
setLastModified(java.lang.String lastModified)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.text.SimpleDateFormat RFC822DateFormat
public boolean enabled
public java.lang.String eTag
public java.lang.String lastModified
public java.util.Date lastModifiedDate
public boolean ifModifiedSince
public boolean ifUnmodifiedSince
public boolean ifMatch
public boolean ifNoneMatch
public boolean ifRange
Constructor Detail |
---|
public HTTPCacheContext()
Method Detail |
---|
public java.lang.String getETag()
public void setETag(java.lang.String tag)
tag
- the eTag to setpublic java.lang.String getLastModified()
public java.util.Date getLastModifiedAsDate()
public void setLastModified(java.lang.String lastModified) throws java.text.ParseException
lastModified
- the lastModified to set
java.text.ParseException
public void setLastModified(java.util.Date updated)
lastModified
- the lastModified to setpublic boolean isIfModifiedSince()
public void setIfModifiedSince(boolean ifModifiedSince)
ifModifedSince
- the ifModifedSince to setpublic boolean isIfUnmodifiedSince()
public void setIfUnmodifiedSince(boolean ifUnmodifiedSince)
ifUnModifiedSince
- the ifUnModifiedSince to setpublic boolean isIfMatch()
public void setIfMatch(boolean ifMatch)
ifMatch
- the ifMatch to setpublic boolean isIfNoneMatch()
public void setIfNoneMatch(boolean ifNoneMatch)
ifNoneMatch
- the ifNoneMatch to setpublic boolean isIfRange()
public void setIfRange(boolean ifRange)
ifRange
- the ifRange to setpublic java.lang.String toString()
toString
in class java.lang.Object
public static HTTPCacheContext getCacheContextFromRequest(HttpServletRequest request) throws java.text.ParseException
request
-
java.text.ParseException
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- the enabled to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |