From fc7512f50f7daa86d1e2b03e818e76e75e2f98b6 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Sun, 9 Jan 2022 00:04:04 +0800 Subject: [PATCH] upgrad doipsdk --- build.gradle | 5 ++++- .../bdware/server/doip/ContractRepositoryHandler.java | 6 +++--- .../org/bdware/server/doip/ContractRepositoryMain.java | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 9b842fc..5f93783 100644 --- a/build.gradle +++ b/build.gradle @@ -39,13 +39,16 @@ dependencies { implementation 'io.grpc:grpc-all:1.43.1' implementation 'org.apache.velocity:velocity-engine-core:2.3' implementation 'com.nimbusds:nimbus-jose-jwt:9.10' + implementation 'org.bdware.doip:doip-sdk:1.1.0' testImplementation 'junit:junit:4.13.2' } compileJava { options.compilerArgs << "-Xlint:unchecked" } - +repositories { + mavenCentral() +} jar { String libs = '' configurations.runtimeClasspath.each { diff --git a/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java b/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java index 36857e5..be3d292 100644 --- a/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java +++ b/src/main/java/org/bdware/server/doip/ContractRepositoryHandler.java @@ -11,9 +11,9 @@ import org.bdware.doip.codec.digitalObject.Element; import org.bdware.doip.codec.doipMessage.DoipMessage; import org.bdware.doip.codec.doipMessage.DoipResponseCode; import org.bdware.doip.codec.operations.BasicOperations; -import org.bdware.doip.endpoint.doipServer.DoipServiceInfo; -import org.bdware.doip.endpoint.doipServer.Op; -import org.bdware.doip.endpoint.doipServer.RepositoryHandlerBase; +import org.bdware.doip.endpoint.server.DoipServiceInfo; +import org.bdware.doip.endpoint.server.Op; +import org.bdware.doip.endpoint.server.RepositoryHandlerBase; import org.bdware.sc.ContractClient; import org.bdware.sc.bean.ContractRequest; import org.bdware.sc.bean.FunctionDesp; diff --git a/src/main/java/org/bdware/server/doip/ContractRepositoryMain.java b/src/main/java/org/bdware/server/doip/ContractRepositoryMain.java index 7ab0561..3e64044 100644 --- a/src/main/java/org/bdware/server/doip/ContractRepositoryMain.java +++ b/src/main/java/org/bdware/server/doip/ContractRepositoryMain.java @@ -2,9 +2,9 @@ package org.bdware.server.doip; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.bdware.doip.endpoint.doipServer.DoipListenerInfo; -import org.bdware.doip.endpoint.doipServer.DoipServerImpl; -import org.bdware.doip.endpoint.doipServer.DoipServiceInfo; +import org.bdware.doip.endpoint.server.DoipListenerConfig; +import org.bdware.doip.endpoint.server.DoipServerImpl; +import org.bdware.doip.endpoint.server.DoipServiceInfo; import org.bdware.server.DOAConf; import org.bdware.server.GlobalConf; @@ -29,8 +29,8 @@ public class ContractRepositoryMain { currentServer.stop(); } - List infos = new ArrayList<>(); - infos.add(new DoipListenerInfo(url, "2.1")); + List infos = new ArrayList<>(); + infos.add(new DoipListenerConfig(url, "2.1")); DoipServiceInfo info = new DoipServiceInfo(doid, "bdware.trust/Admin", "ContractRepo", infos); currentServer = new DoipServerImpl(info); currentServer.setRepositoryHandler(new ContractRepositoryHandler(info));