Kicks of processing of a Daemon. Does the same thing as getDaemon() but
also creates a thread and runs the daemon.
*/
public void process( DaemonEntry entry ) throws DaemonException {
DaemonThread dt = (DaemonThread)this.threads.get( entry );
if (dt == null)
{
start(entry);
dt = (DaemonThread) this.threads.get(entry);
}
//FIX ME: get the status of this daemon before kicking it off again.
int status = this.getStatus( entry );
if (status != Daemon.STATUS_PROCESSING &&
status != Daemon.STATUS_UNKNOWN &&
dt != null) {
//tell this thread to stop waiting and process immediately
synchronized (dt) {
dt.notify();
}
}
if ( dt != null && dt.isAlive() == false ) {
dt.start();
}
}