public class WatchGroup
extends java.lang.Object
| Constructor and Description |
|---|
WatchGroup(org.dsa.iot.dslink.node.Permission perm,
org.dsa.iot.dslink.node.Node node,
Database db) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWatch(Watch watch) |
void |
addWatchUpdateToBuffer(WatchUpdate watchUpdate,
java.util.Date date) |
void |
cancelIntervalScheduler() |
boolean |
canWriteOnNewData() |
void |
close() |
Database |
getDb()
Watches should never write data to the database directly
unless absolutely necessary.
|
protected void |
initSettings() |
protected void |
initWatch(java.lang.String path,
boolean useNewEncodingMethod)
Initializes the watch for the group.
|
void |
removeFromWatches(Watch watch) |
void |
subscribe()
Subscribes to the entire watch group.
|
void |
unsubscribe()
Unsubscribes from the entire watch group.
|
void |
write(Watch watch,
org.dsa.iot.dslink.node.value.SubscriptionValue sv)
Writes to the database based on the watch group settings.
|
public WatchGroup(org.dsa.iot.dslink.node.Permission perm,
org.dsa.iot.dslink.node.Node node,
Database db)
perm - Permission all actions should be set to.node - Watch group node.db - Database the group writes to.public void close()
public Database getDb()
public void write(Watch watch, org.dsa.iot.dslink.node.value.SubscriptionValue sv)
watch - Watch to write from.sv - Subscription update received from the server.protected void initWatch(java.lang.String path,
boolean useNewEncodingMethod)
path - Watch path.useNewEncodingMethod - public void subscribe()
public void unsubscribe()
protected void initSettings()
public boolean canWriteOnNewData()
public void addWatchUpdateToBuffer(WatchUpdate watchUpdate, java.util.Date date)
public void cancelIntervalScheduler()
public void addWatch(Watch watch)
public void removeFromWatches(Watch watch)