Class PropertyChangeSubject

java.lang.Object
org.see.skf.core.PropertyChangeSubject
Direct Known Subclasses:
ExecutionConfiguration

public abstract class PropertyChangeSubject extends Object
Object classes whose instances should generate events when any of its properties change are recommended to extend this class. One or more dedicated PropertyChangeListener instances should be bound to remote entities discovered by the federate. That way, the federate will be immediately notified when a property changes with the exact values provided for comparison.
Since:
2.0
  • Constructor Details

    • PropertyChangeSubject

      protected PropertyChangeSubject()
  • Method Details

    • addPropertyListener

      public void addPropertyListener(PropertyChangeListener listener)
      Register a property change listener that will monitor that is interested in changes to this object's properties.
      Parameters:
      listener - A property change listener.
    • removePropertyListener

      public void removePropertyListener(PropertyChangeListener listener)
      Remove a previously registered property change listener. Nothing happens if the listener is null, was never added or an exception is thrown.
      Parameters:
      listener - The previously registered property change listener.
    • notifyListeners

      public void notifyListeners(String propertyName, Object oldValue, Object newValue)
      Notifies all listeners that a property of this object has changed.
      Parameters:
      propertyName - Name of the property.
      oldValue - The old value of the property.
      newValue - The new value of the property.