[New] Added StrolchAgent.getRuntimeConfiguration()
This commit is contained in:
parent
a9c393f02a
commit
5526f20220
|
@ -81,20 +81,14 @@ public class StrolchAgent {
|
||||||
this.appVersion = appVersion;
|
this.appVersion = appVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the {@link StrolchConfiguration}
|
|
||||||
*
|
|
||||||
* @return the {@link StrolchConfiguration}
|
|
||||||
*/
|
|
||||||
public StrolchConfiguration getStrolchConfiguration() {
|
public StrolchConfiguration getStrolchConfiguration() {
|
||||||
return this.strolchConfiguration;
|
return this.strolchConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public RuntimeConfiguration getRuntimeConfiguration() {
|
||||||
* Return the container
|
return this.strolchConfiguration.getRuntimeConfiguration();
|
||||||
*
|
}
|
||||||
* @return the container
|
|
||||||
*/
|
|
||||||
public ComponentContainer getContainer() {
|
public ComponentContainer getContainer() {
|
||||||
return this.container;
|
return this.container;
|
||||||
}
|
}
|
||||||
|
@ -411,8 +405,9 @@ public class StrolchAgent {
|
||||||
|
|
||||||
public JsonObject getSystemState(long updateInterval, TimeUnit updateIntervalUnit) {
|
public JsonObject getSystemState(long updateInterval, TimeUnit updateIntervalUnit) {
|
||||||
|
|
||||||
if (this.systemState == null ||
|
if (this.systemState == null
|
||||||
System.currentTimeMillis() - this.systemStateUpdateTime > updateIntervalUnit.toMillis(updateInterval)) {
|
|| System.currentTimeMillis() - this.systemStateUpdateTime > updateIntervalUnit.toMillis(
|
||||||
|
updateInterval)) {
|
||||||
this.systemState = new JsonObject();
|
this.systemState = new JsonObject();
|
||||||
|
|
||||||
JsonObject osJ = new JsonObject();
|
JsonObject osJ = new JsonObject();
|
||||||
|
@ -474,8 +469,8 @@ public class StrolchAgent {
|
||||||
File configPathF = runtimeConfig.getConfigPath();
|
File configPathF = runtimeConfig.getConfigPath();
|
||||||
File dataPathF = runtimeConfig.getDataPath();
|
File dataPathF = runtimeConfig.getDataPath();
|
||||||
File tempPathF = runtimeConfig.getTempPath();
|
File tempPathF = runtimeConfig.getTempPath();
|
||||||
StrolchConfiguration newConfig = parseConfiguration(runtimeConfig.getEnvironment(), configPathF,
|
StrolchConfiguration newConfig = parseConfiguration(runtimeConfig.getEnvironment(), configPathF, dataPathF,
|
||||||
dataPathF, tempPathF);
|
tempPathF);
|
||||||
|
|
||||||
for (String name : this.container.getComponentNames()) {
|
for (String name : this.container.getComponentNames()) {
|
||||||
ComponentConfiguration newComponentConfig = newConfig.getComponentConfiguration(name);
|
ComponentConfiguration newComponentConfig = newConfig.getComponentConfiguration(name);
|
||||||
|
|
Loading…
Reference in New Issue