net.i2p.addressbook
Class Daemon

java.lang.Object
  extended by net.i2p.addressbook.Daemon

public class Daemon
extends java.lang.Object

Main class of addressbook. Performs updates, and runs the main loop.

Author:
Ragnarok

Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
Daemon()
           
 
Method Summary
static void main(java.lang.String[] args)
          Load the settings, set the proxy, then enter into the main loop.
 void run(java.lang.String[] args)
           
static void stop()
           
 void update(AddressBook master, AddressBook router, java.io.File published, SubscriptionList subscriptions, Log log)
          Update the router and published address books using remote data from the subscribed address books listed in subscriptions.
 void update(java.util.Map settings, java.lang.String home)
          Run an update, using the Map settings to provide the parameters.
static void wakeup()
          Call this to get the addressbook to reread its config and refetch its subscriptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

Daemon

public Daemon()
Method Detail

update

public void update(AddressBook master,
                   AddressBook router,
                   java.io.File published,
                   SubscriptionList subscriptions,
                   Log log)
Update the router and published address books using remote data from the subscribed address books listed in subscriptions.

Parameters:
master - The master AddressBook. This address book is never overwritten, so it is safe for the user to write to.
router - The router AddressBook. This is the address book read by client applications.
published - The published AddressBook. This address book is published on the user's eepsite so that others may subscribe to it.
subscriptions - A SubscriptionList listing the remote address books to update from.
log - The log to write changes and conflicts to.

update

public void update(java.util.Map settings,
                   java.lang.String home)
Run an update, using the Map settings to provide the parameters.

Parameters:
settings - A Map containg the parameters needed by update.
home - The directory containing addressbook's configuration files.

main

public static void main(java.lang.String[] args)
Load the settings, set the proxy, then enter into the main loop. The main loop performs an immediate update, and then an update every number of hours, as configured in the settings file.

Parameters:
args - Command line arguments. If there are any arguments provided, the first is taken as addressbook's home directory, and the others are ignored.

run

public void run(java.lang.String[] args)

wakeup

public static void wakeup()
Call this to get the addressbook to reread its config and refetch its subscriptions.


stop

public static void stop()