Iterable<AddressBook>
class SubscriptionList extends Object implements Iterable<AddressBook>
Constructor | Description |
---|---|
SubscriptionList(File locationsFile,
File etagsFile,
File lastModifiedFile,
File lastFetchedFile,
long delay,
List<String> defaultSubs,
String proxyHost,
int proxyPort) |
Construct a SubscriptionList using the urls from locationsFile and, if
available, the etags and last-modified headers loaded from etagsFile and
lastModifiedFile.
|
SubscriptionList(String hoststxt) |
Testing only.
|
Modifier and Type | Method | Description |
---|---|---|
SubscriptionIterator |
iterator() |
Return an iterator over the AddressBooks represented by the Subscriptions
in this SubscriptionList.
|
void |
write() |
Write the etag and last-modified headers,
and the last-fetched time, for each Subscription to files.
|
forEach, spliterator
public SubscriptionList(File locationsFile, File etagsFile, File lastModifiedFile, File lastFetchedFile, long delay, List<String> defaultSubs, String proxyHost, int proxyPort)
locationsFile
- A file containing one url on each line.etagsFile
- A file containg the etag headers used for conditional GET. The
file is in the format "url=etag".lastModifiedFile
- A file containg the last-modified headers used for conditional
GET. The file is in the format "url=leastmodified".delay
- the minimum delay since last fetched for the iterator to actually fetchdefaultSubs
- default subscription fileproxyHost
- proxy hostnameproxyPort
- proxy port numberpublic SubscriptionList(String hoststxt)
hoststxt
- path to a local file used as the test 'subscription' inputpublic SubscriptionIterator iterator()
iterator
in interface Iterable<AddressBook>
public void write()