Interface UpdateManager
- All Superinterfaces:
ADEPT2Service
- All Known Implementing Classes:
PVPUpdateManager
The IUpdateManager Interface specifies a way to receive
notification when a tracked object is altered.
The purpose of this is to remove the burden of change-notification from the process model (i.e. Node, Edge, Process, ...) and place it on a an external component.
Instead ChangeOperations, which alter a Process, should notify the UpdateManager of all the objects that have been affected by the change. The UpdateManager will then take care to notify all graphical representations of these elements.
Preferably ChangeOperations will give detailed feedback as to which properties have actually been changed, so that updating the visual model can be done with minimal effort.
The purpose of this is to remove the burden of change-notification from the process model (i.e. Node, Edge, Process, ...) and place it on a an external component.
Instead ChangeOperations, which alter a Process, should notify the UpdateManager of all the objects that have been affected by the change. The UpdateManager will then take care to notify all graphical representations of these elements.
Preferably ChangeOperations will give detailed feedback as to which properties have actually been changed, so that updating the visual model can be done with minimal effort.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumstatic enumstatic enumstatic enumThese constants are needed with subprocesses to signal the activation or termination of a subprocess instance.static enumstatic enumstatic enumEnum for transaction events -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intThe default priority of a listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(Object what, ChangeListener callback) Add callback as a new listener for what, using the default priority.voidaddListener(Object what, ChangeListener callback, int priority) Add callback as a new listener for whatvoidfirePropertyChange(Object procElement, Object property) Notify all interested parties of changes to a Process elementvoidfirePropertyChange(Object procElement, Object property, Object newValue) Notify all interested parties of changes to a Process elementvoidfirePropertyChange(Object procElement, Object property, Object oldValue, Object newValue) Notify all interested parties of changes to a Process elementvoidremoveListener(Object what, ChangeListener callback) Remove a callback from the listener list for object whatvoidSend all queued events and flush the queue.Methods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYThe default priority of a listener.- See Also:
-
ACTIVITY_STATE
- See Also:
-
-
Method Details
-
addListener
Add callback as a new listener for what, using the default priority.- Parameters:
what- The object that is to be monitoredcallback- The object receiving notification
-
addListener
Add callback as a new listener for what- Parameters:
what- The object that is to be monitoredcallback- The object receiving notificationpriority- The priority - smaller numbers lead to earlier calls.
-
removeListener
Remove a callback from the listener list for object what- Parameters:
what- The monitored objectcallback- The PropertyChangeListener to be removed
-
firePropertyChange
Notify all interested parties of changes to a Process element- Parameters:
procElement- The altered Process elementproperty- The altered property
-
firePropertyChange
Notify all interested parties of changes to a Process element- Parameters:
procElement- The altered Process elementproperty- The altered propertynewValue- The new value of the process element
-
firePropertyChange
Notify all interested parties of changes to a Process element- Parameters:
procElement- The altered Process elementproperty- The altered propertyoldValue- The old value of the process elementnewValue- The new value of the process element
-
sendPropertyChanges
void sendPropertyChanges()Send all queued events and flush the queue.
-