diff options
| author | ShazaAhmed <ShazaMamdouh@aucegypt.edu> | 2024-12-03 13:26:06 -0500 |
|---|---|---|
| committer | ShazaAhmed <ShazaMamdouh@aucegypt.edu> | 2024-12-03 13:27:17 -0500 |
| commit | b7f7d9872b5820521b77f4a3175c5d1c1a0c4058 (patch) | |
| tree | 81fc7c283e327cca153544d7e3600933f54a5132 /src/main/java/derms/replica1/DERMSServerPublisher.java | |
| parent | a0a6fcd7bd2dd2fb736477bcbd3d034b38565fba (diff) | |
| parent | b0214bbc7e7a7ee6aac9dca2610060ac0f88dc77 (diff) | |
| download | soen423-b7f7d9872b5820521b77f4a3175c5d1c1a0c4058.zip | |
Merge branch 'test'
Diffstat (limited to 'src/main/java/derms/replica1/DERMSServerPublisher.java')
| -rw-r--r-- | src/main/java/derms/replica1/DERMSServerPublisher.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/derms/replica1/DERMSServerPublisher.java b/src/main/java/derms/replica1/DERMSServerPublisher.java index 44ee879..c94cb34 100644 --- a/src/main/java/derms/replica1/DERMSServerPublisher.java +++ b/src/main/java/derms/replica1/DERMSServerPublisher.java @@ -3,8 +3,27 @@ package derms.replica1; import javax.xml.ws.Endpoint;
public class DERMSServerPublisher {
+
+ private static Endpoint[] endpoints = new Endpoint[3];
+
public static void main(String[] args) {
// try {
+// endpoints[0] = Endpoint.publish("http://localhost:8387/ws/derms", new DERMSServer("MTL"));
+// endpoints[1] = Endpoint.publish("http://localhost:8081/ws/derms", new DERMSServer("QUE"));
+// endpoints[2] = Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE"));
+// } catch (InterruptedException e) {
+// throw new RuntimeException(e);
+// }
+ }
+
+ public static void stop() {
+ for (Endpoint endpoint : endpoints) {
+ if (endpoint != null && endpoint.isPublished()) {
+ endpoint.stop();
+ System.out.println("DERMS Server is stopped.");
+ }
+ }
+// try {
// Endpoint.publish("http://localhost:8387/ws/derms", new DERMSServer("MTL"));
// Endpoint.publish("http://localhost:8081/ws/derms", new DERMSServer("QUE"));
// Endpoint.publish("http://localhost:8082/ws/derms", new DERMSServer("SHE"));
|