|
|
@ -18,6 +18,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
package io.entgra.server.bootup.heartbeat.beacon;
|
|
|
|
package io.entgra.server.bootup.heartbeat.beacon;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import io.entgra.server.bootup.heartbeat.beacon.config.datasource.DataSourceConfig;
|
|
|
|
import io.entgra.server.bootup.heartbeat.beacon.exception.InvalidConfigurationStateException;
|
|
|
|
import io.entgra.server.bootup.heartbeat.beacon.exception.InvalidConfigurationStateException;
|
|
|
|
import org.w3c.dom.Document;
|
|
|
|
import org.w3c.dom.Document;
|
|
|
|
import org.wso2.carbon.utils.CarbonUtils;
|
|
|
|
import org.wso2.carbon.utils.CarbonUtils;
|
|
|
@ -36,6 +37,7 @@ public class HeartBeatBeaconConfig {
|
|
|
|
private int notifierDelay;
|
|
|
|
private int notifierDelay;
|
|
|
|
private int serverTimeOutIntervalInSeconds;
|
|
|
|
private int serverTimeOutIntervalInSeconds;
|
|
|
|
private int timeSkew;
|
|
|
|
private int timeSkew;
|
|
|
|
|
|
|
|
private DataSourceConfig dataSourceConfig;
|
|
|
|
|
|
|
|
|
|
|
|
private static HeartBeatBeaconConfig config;
|
|
|
|
private static HeartBeatBeaconConfig config;
|
|
|
|
|
|
|
|
|
|
|
@ -89,6 +91,15 @@ public class HeartBeatBeaconConfig {
|
|
|
|
this.serverTimeOutIntervalInSeconds = serverTimeOutIntervalInSeconds;
|
|
|
|
this.serverTimeOutIntervalInSeconds = serverTimeOutIntervalInSeconds;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@XmlElement(name = "DataSourceConfiguration", required = true)
|
|
|
|
|
|
|
|
public DataSourceConfig getDataSourceConfig() {
|
|
|
|
|
|
|
|
return dataSourceConfig;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setDataSourceConfig(DataSourceConfig dataSourceConfig) {
|
|
|
|
|
|
|
|
this.dataSourceConfig = dataSourceConfig;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void init() throws HeartBeatBeaconConfigurationException {
|
|
|
|
public static void init() throws HeartBeatBeaconConfigurationException {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
File emailSenderConfig = new File(HEART_BEAT_NOTIFIER_CONFIG_PATH);
|
|
|
|
File emailSenderConfig = new File(HEART_BEAT_NOTIFIER_CONFIG_PATH);
|
|
|
|