} catch (MojoFailureException e1) {
e1.printStackTrace();
}
AgentDaemon daemon_agent;
AgentImplementation default_agent;
try {
if (isDaemonOption()) {
if(logger.isDebugEnabled()){
logger.debug("");
logger.debug(" ---------------------------");
logger.debug("| Create an AgentDaemon |");
logger.debug(" ---------------------------");
}
daemon_agent =
new AgentDaemon(
logger,
getDaemonPeriod(),
new AgentImplementation(logger, getFileProperties(), false));
daemon_agent.run();
daemon_agent.shutdown();
}
else
{
if(logger.isDebugEnabled()){
logger.debug("");
logger.debug(" -----------------------------------");
logger.debug("| Create an AgentImplementation |");
logger.debug(" -----------------------------------");
}
default_agent = new AgentImplementation(logger, getFileProperties(), true);
default_agent.run();
default_agent.shutdown();
}
} catch (GrinderException e) {
e.printStackTrace();
}
}