diff --git a/plc-gw-server/src/main/java/li/strolch/plc/gw/server/policy/execution/PlcExecutionPolicy.java b/plc-gw-server/src/main/java/li/strolch/plc/gw/server/policy/execution/PlcExecutionPolicy.java index 58f842c..b1124e9 100644 --- a/plc-gw-server/src/main/java/li/strolch/plc/gw/server/policy/execution/PlcExecutionPolicy.java +++ b/plc-gw-server/src/main/java/li/strolch/plc/gw/server/policy/execution/PlcExecutionPolicy.java @@ -57,6 +57,11 @@ public abstract class PlcExecutionPolicy extends SimpleExecution this.registeredKeys.add(key); } + protected void unregister(PlcAddressKey key) { + this.plcHandler.unregister(getPlcId(), key, this); + this.registeredKeys.remove(key); + } + protected void unregisterAll() { this.registeredKeys.forEach(k -> this.plcHandler.unregister(getPlcId(), k, this)); }