com.universaldevices.device.model
Class UDModelChangeListener

java.lang.Object
  extended by com.universaldevices.device.model.UDModelChangeListener
All Implemented Interfaces:
IModelChangeListener

public class UDModelChangeListener
extends java.lang.Object
implements IModelChangeListener


Field Summary
 
Fields inherited from interface com.universaldevices.device.model.IModelChangeListener
UD_BATCH_MODE_CHANGED_ACTION, UD_BATTERY_DEVICE_WRITE_MODE_CHANGED_ACTION, UD_CLIENT_HEART_BEAT_EVENT, UD_DEVICE_SPECIFIC_EVENT, UD_DISCOVERING_NODES_ACTION, UD_DISCOVERING_NODES_COMPLETE_ACTION, UD_FOLDER_ADDED_ACTION, UD_FOLDER_REMOVED_ACTION, UD_FOLDER_RENAMED_ACTION, UD_GROUP_ADDED_ACTION, UD_GROUP_REMOVED_ACTION, UD_GROUP_RENAMED_ACTION, UD_INTERNET_ACCESS_DISABLED_ACTION, UD_INTERNET_ACCESS_ENABLED_ACTION, UD_INTERNET_ACCESS_EVENT, UD_INTERNET_ACCESS_FAILED_ACTION, UD_NETWORK_RENAMED_ACTION, UD_NODE_ADDED_ACTION, UD_NODE_CHANGE_LINK_ACTION, UD_NODE_CLEAR_ERROR_ACTION, UD_NODE_DEVICE_ID_CHANGED, UD_NODE_DEVICE_PROPERTY_CHANGED, UD_NODE_ENABLED_ACTION, UD_NODE_HAS_PENDING_DEVICE_WRITES_ACTION, UD_NODE_IN_ERROR_ACTION, UD_NODE_MOVED_ACTION, UD_NODE_PARENT_CHANGED_ACTION, UD_NODE_POWER_INFO_CHANGED_ACTION, UD_NODE_REMOVED_ACTION, UD_NODE_REMOVED_FROM_GROUP_ACTION, UD_NODE_RENAMED_ACTION, UD_NODE_REVISED_ACTION, UD_NODE_WRITING_TO_DEVICE_ACTION, UD_NODES_UPDATED_EVENT, UD_NOTIFICATION_SETTINGS_UPDATED_ACTION, UD_NTP_COMM_FAILED_ACTION, UD_NTP_SETTINGS_UPDATED_ACTION, UD_PROGRESS_EVENT_UPDATE, UD_PROGRESS_UPDATED_EVENT, UD_SYS_CONFIG_UPDATED_EVENT, UD_SYSTEM_BUSY_EVENT, UD_SYSTEM_IS_BUSY_ACTION, UD_SYSTEM_IS_IDLE_ACTION, UD_SYSTEM_IS_IN_SAFE_MODE_ACTION, UD_SYSTEM_IS_NOT_BUSY_ACTION, UD_TIME_CHANGED_ACTION, UD_TIME_CONFIG_CHANGED_ACTION, UD_TRIGGER_EVENT_GET_STATUS, UD_TRIGGER_EVENT_INFO_STRING, UD_TRIGGER_EVENT_KEY_CHANGED, UD_TRIGGER_EVENT_LEARN_IR, UD_TRIGGER_EVENT_SCHEDULE, UD_TRIGGER_EVENT_STATUS, UD_TRIGGER_EVENT_VAR_INIT, UD_TRIGGER_EVENT_VAR_STATUS, UD_TRIGGER_UPDATED_EVENT
 
Constructor Summary
UDModelChangeListener()
           
 
Method Summary
 void onDeviceOffLine(UDProxyDevice device)
          Notifies the client that ISY is no longer reachable
 void onDeviceOnLine(UDProxyDevice device)
          Notifies the client that ISY is accessible and on-line.
 void onDeviceSpecific(UDProxyDevice device, java.lang.String action, java.lang.String node, XMLElement ei)
          Notifies the client of any device specific changes.
 void onDiscoveringNodes(UDProxyDevice device)
          Notifies the client that the system is in Linking mode.
 void onFolderRemoved(UDProxyDevice device, java.lang.String folderAddress)
          Notifies the client of the removal of a folder from the system.
 void onFolderRenamed(UDProxyDevice device, UDFolder folder)
          Notifies the client of the change in name of a folder in the system.
 void onGroupRemoved(UDProxyDevice device, java.lang.String groupAddress)
          Notifies the client of the removal of a group from the system.
 void onGroupRenamed(UDProxyDevice device, UDGroup group)
          Notifies the client of the change in name of a group in the system.
 void onInternetAccessUpdated(UDProxyDevice device, java.lang.String url, java.lang.String action)
          Notifies the client of the status of internet access
 void onModelChanged(UDProxyDevice device, UDControl control, java.lang.Object value, UDNode node)
          Notifies the client that a UDControl changed.
 void onNetworkRenamed(UDProxyDevice device, java.lang.String newName)
          Notifies the client of the name change in the top most node in the device tree (network).
 void onNewDevice(UDProxyDevice device)
          Notifies the client that a new device was discovered.
 void onNewFolder(UDProxyDevice device, UDFolder newFolder)
          Notifies the client of the addition of a new folder to the system.
 void onNewGroup(UDProxyDevice device, UDGroup newGroup)
          Notifies the client of the addition of a new group/scene to the system.
 void onNewNode(UDProxyDevice device, UDNode newNode)
          Notifies the client of the addition of a new node (device) to the system.
 void onNodeDeviceIdChanged(UDProxyDevice device, UDNode node)
          Notifies the client that the address of the device represented by this node has changed.
 void onNodeDevicePropertiesRefreshed(UDProxyDevice device, UDNode node)
          Notifies the client that all the devices properties for a node were refreshed
 void onNodeDevicePropertiesRefreshedComplete(UDProxyDevice proxyDevice)
          Called after the properties for one or more nodes has been refreshed.
 void onNodeDevicePropertyChanged(UDProxyDevice device, UDNode node, com.universaldevices.common.properties.UDProperty<?> property)
          Notifies the client that a node property has changed
 void onNodeDiscoveryStopped(UDProxyDevice device)
          Notifies the client that the system is no longer in Linking mode.
 void onNodeEnabled(UDProxyDevice device, UDNode node, boolean b)
          Notifies the client that a node (device) in the system has either been enabled or disabled
 void onNodeError(UDProxyDevice device, UDNode node)
          Notifies the client that a node (device) in the system has encountered an error (communications or otherwise)
 void onNodeErrorCleared(UDProxyDevice device, UDNode node)
          Notifies the client that a node (device) in the system no longer has an error (communications or otherwise)
 void onNodeHasPendingDeviceWrites(UDProxyDevice device, UDNode node, boolean hasPending)
          Notifies the client that a node's parent has changed
 void onNodeIsWritingToDevice(UDProxyDevice device, UDNode node, boolean isWriting)
          Notifies the client that a node's parent has changed
 void onNodeMoved(UDProxyDevice device, UDNode node, UDGroup group, char role)
          Notifies the client that a node was moved into a group/scene
 void onNodeParentChanged(UDProxyDevice device, UDNode node, UDNode newParent)
          Notifies the client that a node's parent has changed
 void onNodePowerInfoChanged(UDProxyDevice device, UDNode node)
          Notifies the clients that the node's power utilization information has changed
 void onNodeRemoved(UDProxyDevice device, java.lang.String nodeAddress)
          Notifies the client of the removal of a node (device) from the system.
 void onNodeRemovedFromGroup(UDProxyDevice device, UDNode node, UDGroup group)
          Notifies the client of the removal of a node from a group in the system.
 void onNodeRenamed(UDProxyDevice device, UDNode node)
          Notifies the client of the change in name of a node in the system.
 void onNodeRevised(UDProxyDevice device, UDNode node)
          Notifies the client of the revision of a node (device) to the system.
 void onNodeToGroupRoleChanged(UDProxyDevice device, UDNode node, UDGroup group, char newRole)
          Notifies the client that the node's role for a group changed
 void onProgress(UDProxyDevice device, java.lang.String action, XMLElement ei)
          Notifies the client of the progress of actions currently being taken.
 void onSystemConfigChanged(UDProxyDevice device, java.lang.String event, XMLElement eventInfo)
          Notifies the client that system configurations have changed
 void onSystemStatus(UDProxyDevice device, java.lang.String event)
          Notifies the client whether or not the system is busy
 void onTriggerStatus(UDProxyDevice device, java.lang.String action, XMLElement ei)
          Notifies the client of any changes in the schedules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDModelChangeListener

public UDModelChangeListener()
Method Detail

onDeviceOffLine

public void onDeviceOffLine(UDProxyDevice device)
Description copied from interface: IModelChangeListener
Notifies the client that ISY is no longer reachable

Specified by:
onDeviceOffLine in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice which is no longer reachable

onDeviceOnLine

public void onDeviceOnLine(UDProxyDevice device)
Description copied from interface: IModelChangeListener
Notifies the client that ISY is accessible and on-line.

Specified by:
onDeviceOnLine in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice which is on-line

onDeviceSpecific

public void onDeviceSpecific(UDProxyDevice device,
                             java.lang.String action,
                             java.lang.String node,
                             XMLElement ei)
Description copied from interface: IModelChangeListener
Notifies the client of any device specific changes.

Specified by:
onDeviceSpecific in interface IModelChangeListener
Parameters:
device - The UDProxyDevice originating this event
action - The action to perform based on this event
node - (if any) to which this action was performed
ei - Detailed status information

onDiscoveringNodes

public void onDiscoveringNodes(UDProxyDevice device)
Description copied from interface: IModelChangeListener
Notifies the client that the system is in Linking mode. Except for logging requests, all other requests will be denied

Specified by:
onDiscoveringNodes in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event

onFolderRemoved

public void onFolderRemoved(UDProxyDevice device,
                            java.lang.String folderAddress)
Description copied from interface: IModelChangeListener
Notifies the client of the removal of a folder from the system.

Specified by:
onFolderRemoved in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
folderAddress - - the address of the group which has been removed

onFolderRenamed

public void onFolderRenamed(UDProxyDevice device,
                            UDFolder folder)
Description copied from interface: IModelChangeListener
Notifies the client of the change in name of a folder in the system.

Specified by:
onFolderRenamed in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
folder - - the UDFolder which was renamed. The UDFolder will have the new name.

onGroupRemoved

public void onGroupRemoved(UDProxyDevice device,
                           java.lang.String groupAddress)
Description copied from interface: IModelChangeListener
Notifies the client of the removal of a group from the system.

Specified by:
onGroupRemoved in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
groupAddress - - the address of the group which has been removed

onGroupRenamed

public void onGroupRenamed(UDProxyDevice device,
                           UDGroup group)
Description copied from interface: IModelChangeListener
Notifies the client of the change in name of a group in the system.

Specified by:
onGroupRenamed in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
group - - the UDGroup which was renamed. The UDGroup will have the new name.

onInternetAccessUpdated

public void onInternetAccessUpdated(UDProxyDevice device,
                                    java.lang.String url,
                                    java.lang.String action)
Description copied from interface: IModelChangeListener
Notifies the client of the status of internet access

Specified by:
onInternetAccessUpdated in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
url - - if enabled, the url through which the device can be accessed
action - - any of the following all defined in this interface: IModelChangeListener.UD_INTERNET_ACCESS_ENABLED_ACTION IModelChangeListener.UD_INTERNET_ACCESS_DISABLED_ACTION IModelChangeListener.UD_INTERNET_ACCESS_FAILED_ACTION

onModelChanged

public void onModelChanged(UDProxyDevice device,
                           UDControl control,
                           java.lang.Object value,
                           UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client that a UDControl changed. i.e. The status was changed to on or a switch was turned off, etc.

Specified by:
onModelChanged in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
control - - the UDControl which was affected
value - - the new value of the UDControl
node - - the UDNode (or linked device) which was affected

onNetworkRenamed

public void onNetworkRenamed(UDProxyDevice device,
                             java.lang.String newName)
Description copied from interface: IModelChangeListener
Notifies the client of the name change in the top most node in the device tree (network).

Specified by:
onNetworkRenamed in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
newName - - the new name for network

onNewDevice

public void onNewDevice(UDProxyDevice device)
Description copied from interface: IModelChangeListener
Notifies the client that a new device was discovered. The client, then, may take appropriate action based on the newly discovered device

Specified by:
onNewDevice in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice which has been discovered

onNewFolder

public void onNewFolder(UDProxyDevice device,
                        UDFolder newFolder)
Description copied from interface: IModelChangeListener
Notifies the client of the addition of a new folder to the system.

Specified by:
onNewFolder in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
newFolder - - the new UDFolder which was added

onNewGroup

public void onNewGroup(UDProxyDevice device,
                       UDGroup newGroup)
Description copied from interface: IModelChangeListener
Notifies the client of the addition of a new group/scene to the system.

Specified by:
onNewGroup in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
newGroup - - the new UDGroup which was added

onNewNode

public void onNewNode(UDProxyDevice device,
                      UDNode newNode)
Description copied from interface: IModelChangeListener
Notifies the client of the addition of a new node (device) to the system.

Specified by:
onNewNode in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
newNode - - the new UDNode which was added

onNodeDeviceIdChanged

public void onNodeDeviceIdChanged(UDProxyDevice device,
                                  UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client that the address of the device represented by this node has changed.

Specified by:
onNodeDeviceIdChanged in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode

onNodeDevicePropertiesRefreshed

public void onNodeDevicePropertiesRefreshed(UDProxyDevice device,
                                            UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client that all the devices properties for a node were refreshed

Specified by:
onNodeDevicePropertiesRefreshed in interface IModelChangeListener
node - The UDNode that changed

onNodeDevicePropertiesRefreshedComplete

public void onNodeDevicePropertiesRefreshedComplete(UDProxyDevice proxyDevice)
Description copied from interface: IModelChangeListener
Called after the properties for one or more nodes has been refreshed.

Specified by:
onNodeDevicePropertiesRefreshedComplete in interface IModelChangeListener

onNodeDevicePropertyChanged

public void onNodeDevicePropertyChanged(UDProxyDevice device,
                                        UDNode node,
                                        com.universaldevices.common.properties.UDProperty<?> property)
Description copied from interface: IModelChangeListener
Notifies the client that a node property has changed

Specified by:
onNodeDevicePropertyChanged in interface IModelChangeListener
node - The UDNode that changed
property - The property that changed.

onNodeDiscoveryStopped

public void onNodeDiscoveryStopped(UDProxyDevice device)
Description copied from interface: IModelChangeListener
Notifies the client that the system is no longer in Linking mode.

Specified by:
onNodeDiscoveryStopped in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event

onNodeEnabled

public void onNodeEnabled(UDProxyDevice device,
                          UDNode node,
                          boolean b)
Description copied from interface: IModelChangeListener
Notifies the client that a node (device) in the system has either been enabled or disabled

Specified by:
onNodeEnabled in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode that is enabled or disabled
b - - if true, node is enabled, otherwise node is disabled

onNodeError

public void onNodeError(UDProxyDevice device,
                        UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client that a node (device) in the system has encountered an error (communications or otherwise)

Specified by:
onNodeError in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode that is in error

onNodeErrorCleared

public void onNodeErrorCleared(UDProxyDevice device,
                               UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client that a node (device) in the system no longer has an error (communications or otherwise)

Specified by:
onNodeErrorCleared in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode that was in error

onNodeHasPendingDeviceWrites

public void onNodeHasPendingDeviceWrites(UDProxyDevice device,
                                         UDNode node,
                                         boolean hasPending)
Description copied from interface: IModelChangeListener
Notifies the client that a node's parent has changed

Specified by:
onNodeHasPendingDeviceWrites in interface IModelChangeListener
node - The UDNode that changed
hasPending - Flag indicating whether device writes waiting to be written or not.

onNodeIsWritingToDevice

public void onNodeIsWritingToDevice(UDProxyDevice device,
                                    UDNode node,
                                    boolean isWriting)
Description copied from interface: IModelChangeListener
Notifies the client that a node's parent has changed

Specified by:
onNodeIsWritingToDevice in interface IModelChangeListener
node - The UDNode that changed
isWriting - Flag indicating whether data is currently being written to the device or not.

onNodeMoved

public void onNodeMoved(UDProxyDevice device,
                        UDNode node,
                        UDGroup group,
                        char role)
Description copied from interface: IModelChangeListener
Notifies the client that a node was moved into a group/scene

Specified by:
onNodeMoved in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode which was moved
group - - the UDGroup which the node was moved to
role - - the role which the node plays in the group; currently this value is restricted to Constants.NODE_IS_MASTER i.e. this node is either a master/controller of this group or a slave/responder

onNodeParentChanged

public void onNodeParentChanged(UDProxyDevice device,
                                UDNode node,
                                UDNode newParent)
Description copied from interface: IModelChangeListener
Notifies the client that a node's parent has changed

Specified by:
onNodeParentChanged in interface IModelChangeListener
node - - the UDNode that has its parent changed
newParent - - the UDNode of the new parent - may be null

onNodePowerInfoChanged

public void onNodePowerInfoChanged(UDProxyDevice device,
                                   UDNode node)
Description copied from interface: IModelChangeListener
Notifies the clients that the node's power utilization information has changed

Specified by:
onNodePowerInfoChanged in interface IModelChangeListener
Parameters:
device - - UDProxyDevice
node - - the node

onNodeRemoved

public void onNodeRemoved(UDProxyDevice device,
                          java.lang.String nodeAddress)
Description copied from interface: IModelChangeListener
Notifies the client of the removal of a node (device) from the system.

Specified by:
onNodeRemoved in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
nodeAddress - - the address of the node which has been removed

onNodeRemovedFromGroup

public void onNodeRemovedFromGroup(UDProxyDevice device,
                                   UDNode node,
                                   UDGroup group)
Description copied from interface: IModelChangeListener
Notifies the client of the removal of a node from a group in the system.

Specified by:
onNodeRemovedFromGroup in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode which is removed from the group
group - - the UDGroup from which the node was removed

onNodeRenamed

public void onNodeRenamed(UDProxyDevice device,
                          UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client of the change in name of a node in the system.

Specified by:
onNodeRenamed in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode which was renamed. The UDNode will have the new name.

onNodeRevised

public void onNodeRevised(UDProxyDevice device,
                          UDNode node)
Description copied from interface: IModelChangeListener
Notifies the client of the revision of a node (device) to the system.

Specified by:
onNodeRevised in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the new UDNode which was revised

onNodeToGroupRoleChanged

public void onNodeToGroupRoleChanged(UDProxyDevice device,
                                     UDNode node,
                                     UDGroup group,
                                     char newRole)
Description copied from interface: IModelChangeListener
Notifies the client that the node's role for a group changed

Specified by:
onNodeToGroupRoleChanged in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
node - - the UDNode whose role changed
group - - the UDGroup whose role to the node changed
newRole - - the new role which the node plays in the group; currently this value is restricted to Constants.NODE_IS_MASTER i.e. this node is either a master/controller of this group or a slave/responder

onProgress

public void onProgress(UDProxyDevice device,
                       java.lang.String action,
                       XMLElement ei)
Description copied from interface: IModelChangeListener
Notifies the client of the progress of actions currently being taken.

Specified by:
onProgress in interface IModelChangeListener
Parameters:
device - The UDProxyDevice originating this event
action - The action to perform based on this event
ei - Detailed status information

onSystemConfigChanged

public void onSystemConfigChanged(UDProxyDevice device,
                                  java.lang.String event,
                                  XMLElement eventInfo)
Description copied from interface: IModelChangeListener
Notifies the client that system configurations have changed

Specified by:
onSystemConfigChanged in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
event - - can be any of
IModelChangeListener.UD_TIME_CHANGED_ACTION
IModelChangeListener.UD_TIME_CONFIG_CHANGED_ACTION
IModelChangeListener.UD_NTP_SETTINGS_UPDATED_ACTION
IModelChangeListener.UD_NOTIFICATION_SETTINGS_UPDATED_ACTION
IModelChangeListener.UD_NTP_COMM_FAILED_ACTION
eventInfo - - any additional information sent by ISY

onSystemStatus

public void onSystemStatus(UDProxyDevice device,
                           java.lang.String event)
Description copied from interface: IModelChangeListener
Notifies the client whether or not the system is busy

Specified by:
onSystemStatus in interface IModelChangeListener
Parameters:
device - - the UDProxyDevice originating this event
event - - can be any of
IModelChangeListener.UD_SYSTEM_IS_NOT_BUSY_ACTION
IModelChangeListener.UD_SYSTEM_IS_BUSY_ACTION
IModelChangeListener.UD_SYSTEM_IS_IDLE_ACTION

onTriggerStatus

public void onTriggerStatus(UDProxyDevice device,
                            java.lang.String action,
                            XMLElement ei)
Description copied from interface: IModelChangeListener
Notifies the client of any changes in the schedules

Specified by:
onTriggerStatus in interface IModelChangeListener
Parameters:
device - The UDProxyDevice originating this event
action - The action to perform based on this event
ei - Detailed status information