com.partnersoft.system
Class DaemonLib

java.lang.Object
  extended by com.partnersoft.system.DaemonLib
All Implemented Interfaces:
Lib

public class DaemonLib
extends java.lang.Object
implements Lib

Convenience routines to handle daemon startup, shutdown, and registry.

Daemons are registered in the Registry named... "Daemons".

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Method Summary
static Daemon daemonNamed(java.lang.String name)
          Fetches the daemon with the given name from the registry, null if there is none.
static void registerDaemon(java.lang.String name, Daemon daemon)
          Registers the given Daemon under the given name.
static Registry<Daemon> registry()
          Returns the Daemon registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registry

public static Registry<Daemon> registry()
Returns the Daemon registry. Creates and registers it if it's not there already.


daemonNamed

public static Daemon daemonNamed(java.lang.String name)
Fetches the daemon with the given name from the registry, null if there is none.


registerDaemon

public static void registerDaemon(java.lang.String name,
                                  Daemon daemon)
Registers the given Daemon under the given name.