use of edu.uiuc.ncsa.security.util.mail.MailUtilProvider in project OA4MP by ncsa.
the class Monitor method initialize.
@Override
public void initialize() throws Exception {
super.initialize();
// Allow for over-riding the log file from the command line.
if (getLogfileName().equals(DEFAULT_LOG_FILE)) {
setMyLogger(getEnvironment().getMyLogger());
} else {
File f = new File(getLogfileName());
info("Setting up environment, log file = " + f.getAbsolutePath());
}
String cfgName = null;
if (hasOption(CONFIG_NAME_OPTION, CONFIG_NAME_LONG_OPTION)) {
cfgName = getCommandLine().getOptionValue(CONFIG_NAME_OPTION);
}
if (cfgName == null) {
info("no named for a configuration given");
} else {
info("getting named configuration \"" + cfgName + "\"");
}
try {
List list = getConfigurationNode().getChildren("mail");
if (list.size() != 0) {
mup = new MailUtilProvider((ConfigurationNode) list.get(0));
}
} catch (Throwable t) {
info("Did not initialize a mail notification environment:" + t.getMessage());
}
serviceClient = ((AbstractClientLoader) getLoader()).createServiceClient(getClientEnvironment().getAccessTokenUri());
info("Done with bootstrap.");
}
Aggregations