mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 01:44:04 +00:00
optimize: use jquery 2.1.4.min
refactor: DOA Contract update: use doip sdk 1.0.2
This commit is contained in:
parent
7d04d48f50
commit
ec21fc9500
BIN
libs/DOIPSDK-1.0.2-SNAPSHOT.jar
Normal file
BIN
libs/DOIPSDK-1.0.2-SNAPSHOT.jar
Normal file
Binary file not shown.
@ -4,6 +4,9 @@ import org.bdware.sc.bean.ContractRequest;
|
||||
import org.bdware.sc.conn.OnHashCallback;
|
||||
|
||||
public interface ChainOpener {
|
||||
void reRegister(String doid);
|
||||
String register(String arg);
|
||||
|
||||
void writeContractResultToLocalAndLedger(
|
||||
String result,
|
||||
ContractClient client,
|
||||
|
@ -7,9 +7,6 @@ import io.prometheus.client.Counter;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bdware.doip.core.model.handleRecord.DoHandleRecord;
|
||||
import org.bdware.doip.core.utils.GlobalConfigurations;
|
||||
import org.bdware.doip.endpoint.irpClient.GlobalIrpClient;
|
||||
import org.bdware.sc.ContractResult.Status;
|
||||
import org.bdware.sc.bean.*;
|
||||
import org.bdware.sc.conn.OnHashCallback;
|
||||
@ -77,7 +74,7 @@ public class ContractManager {
|
||||
public static ScheduledExecutorService scheduledThreadPool =
|
||||
Executors.newScheduledThreadPool(10);
|
||||
|
||||
public static DoipServiceInfoConfigurer doipConfigurer;
|
||||
|
||||
|
||||
public static int logStage = 0;
|
||||
public static Sigar sigar = null; // 获取network等资源什么
|
||||
@ -459,6 +456,7 @@ public class ContractManager {
|
||||
}
|
||||
|
||||
public ContractClient getContractClientByDoi(String doi) {
|
||||
|
||||
ContractMeta meta = statusRecorder.getContractMeta(doi);
|
||||
return statusRecorder.getContractClient(meta.id);
|
||||
}
|
||||
@ -1033,26 +1031,11 @@ public class ContractManager {
|
||||
if (cm != null && cm.doi != null) {
|
||||
if (!cm.doi.equals("")
|
||||
&& !cm.doi.equals("null")
|
||||
&& c.getType() == ContractExecType.Sole) {
|
||||
&& c.getType() == ContractExecType.Sole && chainOpener != null) {
|
||||
c.setDOI(cm.doi);
|
||||
|
||||
c.setBuildTime(cm.buildTime);
|
||||
c.setDoipFlag(true);
|
||||
|
||||
DoHandleRecord dohr =
|
||||
new DoHandleRecord(
|
||||
GlobalConfigurations.User_Handle,
|
||||
GlobalConfigurations.DoipServiceID);
|
||||
dohr.handle = cm.doi;
|
||||
|
||||
threadPool.execute(
|
||||
() -> {
|
||||
try {
|
||||
GlobalIrpClient.getGlobalClient().reRegister(dohr);
|
||||
} catch (Exception e) {
|
||||
LOGGER.warn("unable to connect LHS: " + e.getMessage());
|
||||
}
|
||||
});
|
||||
chainOpener.reRegister(cm.doi);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1,14 +0,0 @@
|
||||
package org.bdware.sc;
|
||||
|
||||
import org.bdware.doip.application.DoipServiceConfig;
|
||||
import org.bdware.doip.endpoint.doipServer.DoipServiceInfo;
|
||||
|
||||
public interface DoipServiceInfoConfigurer {
|
||||
String getServiceHandle();
|
||||
|
||||
String resetServiceConfig(String configJson);
|
||||
|
||||
DoipServiceConfig getDoipServiceConfig();
|
||||
|
||||
DoipServiceInfo getDoipServiceInfo();
|
||||
}
|
Loading…
Reference in New Issue
Block a user