public class Daemon extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static String | OLD_DEFAULT_SUB |
static String | VERSIONVersion string. |
| Constructor and Description |
|---|
Daemon() |
| Modifier and Type | Method and Description |
|---|---|
static HostChecker | getHostChecker()Get the HostChecker instance for use by web applications |
static void | main(String[] args)Load the settings, set the proxy, then enter into the main loop. |
void | run(String[] args) |
void | stop()Stop the daemon. |
static void | test()Run a self-test: create a context, run one update cycle, and flush logs. |
static void | update(AddressBook master,
AddressBook router,
File published,
SubscriptionList subscriptions,
Log log)Update the router and published address books using remote data from the
subscribed address books listed in subscriptions. |
static void | update(Map<String,String> settings,
String home)Run an update, using the Map settings to provide the parameters. |
static void | update(NamingService router,
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 | wakeup()Call this to get the addressbook to reread its config and
refetch its subscriptions. |
static final String OLD_DEFAULT_SUB
public static final String VERSION
public static HostChecker getHostChecker()
public static void main(String[] args)
args - Command line arguments. If there are any arguments provided,
the first is taken as addressbook's home directory, and the
others are ignored.public void run(String[] args)
args - may be nullpublic void stop()
public static void test()
public static void update(AddressBook master, AddressBook router, File published, SubscriptionList subscriptions, Log log)
master - The master AddressBook. This address book is never overwritten, so it is safe
for the user to write to. It is only merged to the published addressbook. May be null.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. May be null. If non-null, overwrite with the
new addressbook.subscriptions - A SubscriptionList listing the remote address books to update from.log - The log to write changes and conflicts to. May be null.public static void update(Map<String,String> settings, String home)
settings - A Map containg the parameters needed by update.home - The directory containing addressbook's configuration files.public static void update(NamingService router, File published, SubscriptionList subscriptions, Log log)
router - The NamingService to update, generally the root NamingService from the context.published - The published AddressBook. This address book is published on the user's eepsite
so that others may subscribe to it. May be null. If non-null, overwrite with the
new addressbook.subscriptions - A SubscriptionList listing the remote address books to update from.log - The log to write changes and conflicts to. May be null.public void wakeup()