*/
public Daemon getDaemon( DaemonEntry entry ) throws DaemonException {
//FIX ME: before instantiating a daemon ... find out if it is already setup
Daemon daemon = (Daemon)this.daemons.get( entry );
if( daemon != null ) {
return daemon;
} else {
logger.info( "Creating daemon: " + entry.getName() );
}
try {
daemon = (Daemon)Class.forName( entry.getClassname() ).newInstance();
DaemonConfig dc = new DaemonConfig();
daemon.init( dc, entry );
this.daemons.put( entry, daemon );
return daemon;