cern.cmw.rda.server
Class ValueChangeListener

java.lang.Object
  extended by cern.cmw.rda.server.ValueChangeListener

public class ValueChangeListener
extends Object

The listener object that is notified when an I/O value is updated in a device server.

Each ValueChangeListener is attached to exactly one I/O point in a device server; this association is established when the monitorOn method is invoked on the server with this listener as an argument. The listener is then notified whenever the associated value is updated or an attempt to update the value fails due to an I/O error.

See Also:
DeviceServerBase

Method Summary
protected  void finalize()
           
 void ioFailed(IOError error)
          Gets called when an attempt to update the associated value fails due to an I/O error.
 void valueUpdated(Data oldValue, Data newValue, boolean hasChanged)
          Gets called when the associated value is updated.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

valueUpdated

public void valueUpdated(Data oldValue,
                         Data newValue,
                         boolean hasChanged)
Gets called when the associated value is updated.

Parameters:
oldValue - the value before update or null, if unknown
newValue - the updated value
hasChanged - is true if the new value is different from the old one; false otherwise.

ioFailed

public void ioFailed(IOError error)
Gets called when an attempt to update the associated value fails due to an I/O error.

Parameters:
error - the IOError object that describes the error.

finalize

protected void finalize()
Overrides:
finalize in class Object


Copyright © 2007 CERN. All Rights Reserved.