File tree Expand file tree Collapse file tree
plc4j/api/src/main/java/org/apache/plc4x/java/api/messages Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020
2121import org .apache .plc4x .java .api .model .ArrayInfo ;
2222import org .apache .plc4x .java .api .model .PlcTag ;
23+ import org .apache .plc4x .java .api .types .PlcSubscriptionType ;
2324import org .apache .plc4x .java .api .value .PlcValue ;
2425
26+ import java .util .Collections ;
2527import java .util .List ;
2628import java .util .Map ;
29+ import java .util .Set ;
2730
2831public interface PlcBrowseItem {
2932
@@ -48,9 +51,19 @@ public interface PlcBrowseItem {
4851 boolean isWritable ();
4952
5053 /**
51- * @return returns 'true' if we can subscribe this variable.
54+ * @return the set of subscription types this variable supports. An empty set means the
55+ * variable is not subscribable. Implementations must never return {@code null}.
5256 */
53- boolean isSubscribable ();
57+ default Set <PlcSubscriptionType > getSupportedSubscriptionTypes () {
58+ return Collections .emptySet ();
59+ }
60+
61+ /**
62+ * @return returns 'true' if we can subscribe this variable in any subscription mode.
63+ */
64+ default boolean isSubscribable () {
65+ return !getSupportedSubscriptionTypes ().isEmpty ();
66+ }
5467
5568 /**
5669 * @return returns 'true' if we can publish this variable.
You can’t perform that action at this time.
0 commit comments