Class TagSubscriptionModel
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.tags.model.TagSubscriptionModel
-
public class TagSubscriptionModel extends java.lang.Object
The TagSubscriptionModel holds subscriptions to tags, broken up by provider. Providers can add listeners in order to be notified of subscription changes. Subscription change notifications are published on asynchronously
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TagSubscriptionModel.ChangeNotificationJob
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,javax.swing.event.EventListenerList>
listenerLists
These are the entities that listen to changes in the model, keyed off of lcase(provider) name.protected java.util.Map<java.lang.String,java.util.Set<TagSubscription>>
subscriptions
SyncronizedMap - Key on both of these maps is the source name.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TagSubscriptionModel()
TagSubscriptionModel(GatewayContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
java.util.Map<java.lang.String,java.util.Set<TagSubscription>>
getAllSubscriptions()
protected javax.swing.event.EventListenerList
getListenerList(java.lang.String sourceName)
gets the listener list for the given server, and creates one if one doesn't existjava.util.Collection<TagSubscription>
getSubscriptions(java.lang.String sourceName)
void
removeListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
void
subscribe(TagPath path, TagChangeListener listener)
void
subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
void
unsubscribe(TagPath path, TagChangeListener listener)
void
unsubscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
protected java.util.List<TagSubscription>
zipper(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
-
-
-
Field Detail
-
subscriptions
protected java.util.Map<java.lang.String,java.util.Set<TagSubscription>> subscriptions
SyncronizedMap - Key on both of these maps is the source name.
-
listenerLists
protected java.util.Map<java.lang.String,javax.swing.event.EventListenerList> listenerLists
These are the entities that listen to changes in the model, keyed off of lcase(provider) name. SynchronizedMap
-
-
Constructor Detail
-
TagSubscriptionModel
protected TagSubscriptionModel()
-
TagSubscriptionModel
public TagSubscriptionModel(GatewayContext context)
-
-
Method Detail
-
getSubscriptions
public java.util.Collection<TagSubscription> getSubscriptions(java.lang.String sourceName)
-
getAllSubscriptions
public java.util.Map<java.lang.String,java.util.Set<TagSubscription>> getAllSubscriptions()
-
getListenerList
protected javax.swing.event.EventListenerList getListenerList(java.lang.String sourceName)
gets the listener list for the given server, and creates one if one doesn't exist
-
addListener
public void addListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
-
removeListener
public void removeListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
-
subscribe
public void subscribe(TagPath path, TagChangeListener listener)
-
unsubscribe
public void unsubscribe(TagPath path, TagChangeListener listener)
-
subscribe
public void subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
-
unsubscribe
public void unsubscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
-
zipper
protected java.util.List<TagSubscription> zipper(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
-
-