From 62533a0da168d3a3a2ee182010c660190237b72a Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Thu, 20 Jan 2022 20:55:49 +0800 Subject: [PATCH] feat: update event mechanism add second centers for event topics --- src/main/base/org/bdware/sc/event/REvent.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/main/base/org/bdware/sc/event/REvent.java b/src/main/base/org/bdware/sc/event/REvent.java index dfcbaef..7a1b732 100644 --- a/src/main/base/org/bdware/sc/event/REvent.java +++ b/src/main/base/org/bdware/sc/event/REvent.java @@ -17,6 +17,7 @@ public class REvent extends SM2Verifiable implements Serializable { private String sender; private REventSemantics semantics = REventSemantics.AT_LEAST_ONCE; private boolean forward = true; + private String center; public REvent(String topic, REventType type, String content, String requestID) { this.topic = topic; @@ -37,13 +38,6 @@ public class REvent extends SM2Verifiable implements Serializable { return content; } - public boolean isForward() { - return forward; - } - - public void setForward(boolean forward) { - this.forward = forward; - } public String getHash() { return hash; @@ -73,6 +67,22 @@ public class REvent extends SM2Verifiable implements Serializable { this.semantics = semantics; } + public boolean isForward() { + return forward; + } + + public void setForward(boolean forward) { + this.forward = forward; + } + + public String getCenter() { + return center; + } + + public void setCenter(String center) { + this.center = center; + } + public void doSignature(String pubKey, String privKey) { this.setPublicKey(pubKey); this.doSignature(privKey);