|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.httpcache4j.Conditionals
public final class Conditionals
Represents the different conditional types that an HTTP request may have. This are basically 4 things:
| Conditional | Can be combined with | Unspecified |
|---|---|---|
| If-Match | If-Unmodified-Since | If-None-Match, If-Modified-Since |
| If-None-Match | If-Modified-Since | If-Match, If-Unmodified-Since |
| If-Unmodified-Since | If-Match | If-None-Match, If-Modified-Since |
| If-Modified-Since | If-None-Match | If-Match, If-Unmodified-Since |
| Constructor Summary | |
|---|---|
Conditionals()
|
|
Conditionals(java.util.List<Tag> match,
java.util.List<Tag> noneMatch,
org.joda.time.DateTime modifiedSince,
org.joda.time.DateTime unModifiedSince)
|
|
| Method Summary | |
|---|---|
Conditionals |
addIfMatch(Tag tag)
Adds tags to the If-Match header. |
Conditionals |
addIfNoneMatch(Tag tag)
Adds tags to the If-None-Match header. |
java.util.List<Tag> |
getMatch()
|
org.joda.time.DateTime |
getModifiedSince()
|
java.util.List<Tag> |
getNoneMatch()
|
org.joda.time.DateTime |
getUnModifiedSince()
|
Conditionals |
ifModifiedSince(org.joda.time.DateTime time)
You should use the server's time here. |
Conditionals |
ifUnModifiedSince(org.joda.time.DateTime time)
You should use the server's time here. |
boolean |
isUnconditional()
|
Headers |
toHeaders()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Conditionals()
public Conditionals(java.util.List<Tag> match,
java.util.List<Tag> noneMatch,
org.joda.time.DateTime modifiedSince,
org.joda.time.DateTime unModifiedSince)
| Method Detail |
|---|
public Conditionals addIfMatch(Tag tag)
tag - the tag to add, may be null. This means the same as adding Tag.ALL
java.lang.IllegalArgumentException - if ALL is supplied more than once, or you add a null tag more than once.public Conditionals addIfNoneMatch(Tag tag)
tag - the tag to add, may be null. This means the same as adding Tag.ALL
java.lang.IllegalArgumentException - if ALL is supplied more than once, or you add a null tag more than once.public Conditionals ifModifiedSince(org.joda.time.DateTime time)
HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifModifiedSince(response.getLastModified());
time - the time to check.
public Conditionals ifUnModifiedSince(org.joda.time.DateTime time)
HTTPResponse response = .... HTTPRequest request = createRequest(); request = request.conditionals(new Conditionals().ifUnModifiedSince(response.getLastModified());
time - the time to check.
public java.util.List<Tag> getMatch()
public java.util.List<Tag> getNoneMatch()
public org.joda.time.DateTime getModifiedSince()
public org.joda.time.DateTime getUnModifiedSince()
public boolean isUnconditional()
public Headers toHeaders()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||