java.lang.Object
net.i2p.addressbook.Subscription
A subscription to a remote address book.
Field Summary
Constructor Summary
ConstructorsConstructorDescriptionSubscription(String location, String etag, String lastModified, String lastFetched) Construct a Subscription pointing to the address book at location, that was last read at the time represented by etag and lastModified.Method Summary
All MethodsModifier and TypeMethodDescriptiongetEtag()Return the etag header that we received the last time we read this subscription.longReturn when the subscription was last fetched.Return the last-modified header that we received the last time we read this subscription.Return the location this Subscription points at.voidSet the etag header.voidsetLastFetched(long t) Set when the subscription was last fetched.voidsetLastModified(String lastModified) Set the last-modified header.
Field Details
location
Where the subscription list is fetched from.etag
Entity tag of the last fetch, for a conditional request.lastModified
Modified time of the last fetch.lastFetched
private long lastFetchedWhen the list was last fetched, in ms.
Constructor Details
Subscription
Construct a Subscription pointing to the address book at location, that was last read at the time represented by etag and lastModified.- Parameters:
location- A String representing a url to a remote address book. Non-null.etag- The etag header that we received the last time we read this subscription. May be null.lastModified- the last-modified header we received the last time we read this subscription. May be null.lastFetched- when the subscription was last fetched (Java time, as a String). May be null.
Method Details
getLocation
Return the location this Subscription points at.- Returns:
- A String representing a url to a remote address book.
getEtag
Return the etag header that we received the last time we read this subscription.- Returns:
- A String containing the etag header.
setEtag
Set the etag header.- Parameters:
etag- A String containing the etag header.
getLastModified
Return the last-modified header that we received the last time we read this subscription.- Returns:
- A String containing the last-modified header.
setLastModified
Set the last-modified header.- Parameters:
lastModified- A String containing the last-modified header.
getLastFetched
public long getLastFetched()Return when the subscription was last fetched.- Returns:
- the time the subscription was last fetched (Java time in ms)
setLastFetched
public void setLastFetched(long t) Set when the subscription was last fetched.- Parameters:
t- the time the subscription was last fetched (Java time in ms)