public class TagSubscriptionModel
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected class |
TagSubscriptionModel.ChangeNotificationJob |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,javax.swing.event.EventListenerList> |
listenerLists
SynchronizedMap
|
protected java.util.Map<java.lang.String,java.util.Set<TagSubscription>> |
subscriptions
SyncronizedMap - Key on both of these maps is the source name.
|
Constructor and Description |
---|
TagSubscriptionModel(GatewayContext context) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(java.lang.String sourceName,
TagSubscriptionChangeListener listener)
Adds the listener to the specified source.
|
java.util.Map<java.lang.String,java.util.Set<TagSubscription>> |
getAllSubscriptions()
Returns an immutable map of all subscriptions this model has
|
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
|
protected java.lang.String |
getServerPathForNode(TagPath node) |
java.util.Collection<TagSubscription> |
getSubscriptions(java.lang.String sourceName)
Returns the list of subscriptions for a given source
|
void |
removeListener(java.lang.String sourceName,
TagSubscriptionChangeListener listener) |
void |
subscribe(java.util.List<TagPath> paths,
java.util.List<TagChangeListener> listeners) |
void |
subscribe(TagPath path,
TagChangeListener listener) |
void |
unsubscribe(java.util.List<TagPath> paths,
java.util.List<TagChangeListener> listeners) |
void |
unsubscribe(TagPath path,
TagChangeListener listener) |
protected java.util.List<TagSubscription> |
zipper(java.util.List<TagPath> paths,
java.util.List<TagChangeListener> listeners) |
protected java.util.Map<java.lang.String,java.util.Set<TagSubscription>> subscriptions
protected java.util.Map<java.lang.String,javax.swing.event.EventListenerList> listenerLists
public TagSubscriptionModel(GatewayContext context)
protected java.lang.String getServerPathForNode(TagPath node)
public java.util.Collection<TagSubscription> getSubscriptions(java.lang.String sourceName)
public java.util.Map<java.lang.String,java.util.Set<TagSubscription>> getAllSubscriptions()
protected javax.swing.event.EventListenerList getListenerList(java.lang.String sourceName)
public void addListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
public void removeListener(java.lang.String sourceName, TagSubscriptionChangeListener listener)
public void subscribe(TagPath path, TagChangeListener listener)
public void unsubscribe(TagPath path, TagChangeListener listener)
public void subscribe(java.util.List<TagPath> paths, java.util.List<TagChangeListener> listeners)
public 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)