This is an automated email from the ASF dual-hosted git repository.

chrisdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 33651d8374 refactor: Added a "getSupportedSubscriptionTypes()" method 
to PlcBrowseItem
33651d8374 is described below

commit 33651d8374b1c9e0aa45d13568cb7ddfad601436
Author: Christofer Dutz <[email protected]>
AuthorDate: Fri May 8 14:44:51 2026 +0200

    refactor: Added a "getSupportedSubscriptionTypes()" method to PlcBrowseItem
---
 .../apache/plc4x/java/api/messages/PlcBrowseItem.java   | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git 
a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcBrowseItem.java 
b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcBrowseItem.java
index 2de156b74b..da923e3474 100644
--- 
a/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcBrowseItem.java
+++ 
b/plc4j/api/src/main/java/org/apache/plc4x/java/api/messages/PlcBrowseItem.java
@@ -20,10 +20,13 @@ package org.apache.plc4x.java.api.messages;
 
 import org.apache.plc4x.java.api.model.ArrayInfo;
 import org.apache.plc4x.java.api.model.PlcTag;
+import org.apache.plc4x.java.api.types.PlcSubscriptionType;
 import org.apache.plc4x.java.api.value.PlcValue;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 public interface PlcBrowseItem {
 
@@ -48,9 +51,19 @@ public interface PlcBrowseItem {
     boolean isWritable();
 
     /**
-     * @return returns 'true' if we can subscribe this variable.
+     * @return the set of subscription types this variable supports. An empty 
set means the
+     *         variable is not subscribable. Implementations must never return 
{@code null}.
      */
-    boolean isSubscribable();
+    default Set<PlcSubscriptionType> getSupportedSubscriptionTypes() {
+        return Collections.emptySet();
+    }
+
+    /**
+     * @return returns 'true' if we can subscribe this variable in any 
subscription mode.
+     */
+    default boolean isSubscribable() {
+        return !getSupportedSubscriptionTypes().isEmpty();
+    }
 
     /**
      * @return returns 'true' if we can publish this variable.

Reply via email to