return null; // for the compiler
}
}
public ASysMonConfig getConfig() {
final ConfigPropsFile props = new ConfigPropsFile(getProperties(), getConfiguredLogger());
final AApplicationInfoProvider appInfo = props.get("application-info", AApplicationInfoProvider.class);
final ASysMonConfigBuilder builder = new ASysMonConfigBuilder(appInfo);
builder.setTimer(props.get(KEY_TIMER, ATimer.class));
builder.setHttpRequestAnalyzer(props.get(KEY_HTTP_REQUEST_ANALYZER, AHttpRequestAnalyzer.class));
builder.setDefaultPage(props.get(KEY_DEFAULT_PAGE, String.class));
builder.setAveragingDelayForScalarsMillis(props.get(KEY_AVERAGING_DELAY_FOR_SCALARS_MILLIS, Integer.TYPE));
builder.setMeasurementTimeoutNanos(props.get(KEY_MEASUREMENT_TIMEOUT_NANOS, Long.TYPE));
builder.setMaxNumMeasurementTimeouts(props.get(KEY_MAX_NUM_MEASUREMENT_TIMEOUTS, Integer.TYPE));
builder.setDataSinkTimeoutNanos(props.get(KEY_DATA_SINK_TIMEOUT_NANOS, Long.TYPE));
builder.setMaxNumDataSinkTimeouts(props.get(KEY_MAX_NUM_DATA_SINK_TIMEOUTS, Integer.TYPE));
for(AEnvironmentMeasurer m: props.getList(KEY_ENV_MEASURERS, AEnvironmentMeasurer.class)) {
builder.addEnvironmentMeasurer(m);
}
for(AScalarMeasurer m: props.getList(KEY_SCALAR_MEASURERS, AScalarMeasurer.class)) {
builder.addScalarMeasurer(m);
}
for(ADataSink h: props.getList(KEY_DATA_SINKS, ADataSink.class)) {
builder.addDataSink(h);
}
for(String menuEntryRaw: props.getListRaw(KEY_PRESENTATION_MENUS)) {
final String menuEntry = menuEntryRaw.trim();
final List<APresentationPageDefinition> pageDefs = props.getList(KEY_PRESENTATION_MENUS + "." + menuEntry, APresentationPageDefinition.class);
builder.addPresentationMenuEntry(menuEntry, pageDefs);
}
return builder.build();
}