Package org.see.skf.core
Class PropertyChangeSubject
java.lang.Object
org.see.skf.core.PropertyChangeSubject
- Direct Known Subclasses:
ExecutionConfiguration
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyListener(PropertyChangeListener listener) Register a property change listener that will monitor that is interested in changes to this object's properties.voidnotifyListeners(String propertyName, Object oldValue, Object newValue) Notifies all listeners that a property of this object has changed.voidremovePropertyListener(PropertyChangeListener listener) Remove a previously registered property change listener.
-
Constructor Details
-
PropertyChangeSubject
protected PropertyChangeSubject()
-
-
Method Details
-
addPropertyListener
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
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
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.
-