Class PVPUpdateManager
java.lang.Object
de.aristaflow.adept2.base.service.AbstractADEPT2Service
de.aristaflow.adept2.ui.updatemanager.PVPUpdateManager
- All Implemented Interfaces:
ADEPT2Service,LogService,ServiceThreadHandling,UpdateManager
This class manages a set of
The purpose of this is to remove the burden of change-notification from the process model (i.e. Node, Edge, Process, ...)
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.
ChangeListeners
for an object which are notified when properties of that object
change.
The purpose of this is to remove the burden of change-notification from the process model (i.e. Node, Edge, Process, ...)
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 TypeClassDescriptionprotected classThe UpdateRequest is attached to the SWT Default thread responsible for UI updates.Nested classes/interfaces inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
AbstractADEPT2Service.ActiveSessionsNested classes/interfaces inherited from interface de.aristaflow.adept2.core.updatemanager.UpdateManager
UpdateManager.ActivityProperties, UpdateManager.DataEdgeProperties, UpdateManager.DataElementProperties, UpdateManager.EdgeProperties, UpdateManager.InstanceProperties, UpdateManager.NodeProperties, UpdateManager.ProcessProperties, UpdateManager.TransactionProperties -
Field Summary
Fields inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
CONF_CSV_LOGGING, configuration, logger, registry, runtimeRequiredServices, startupRequiredServicesFields inherited from interface de.aristaflow.adept2.core.updatemanager.UpdateManager
ACTIVITY_STATE, DEFAULT_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionPVPUpdateManager(Configuration configuration, Registry registry) The update manager could be called as an ADEPT2Service -
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 whatprotected voidProperty change events are published asynchronous.voidfirePropertyChange(Object procElement, Object prop) Notify all interested parties of changes to a Process elementvoidfirePropertyChange(Object procElement, Object prop, Object newValue) Notify all interested parties of changes to a Process elementvoidfirePropertyChange(Object procElement, Object prop, Object oldValue, Object newValue) Notify all interested parties of changes to a Process elementprotected voidqueuePropertyChanges(Object procElement, PropertyChangeEvent pce) Send PropertyChangeEvent pce to all listeners for object procElementvoidremoveListener(Object what, ChangeListener callback) Remove a callback from the listener list for object whatvoidSend all queued events and flush the queue.Methods inherited from class de.aristaflow.adept2.base.service.AbstractADEPT2Service
_sessionActive, _sessionFinished, activeOrInvalidServiceStateException, changeLogContext, changeLogContext, changeLogContext, consoleLog, csvLoggingEnabled, getClassSpecificJulLogger, getDependencyRegistry, getLocalUris, getLogger, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, getUserCredentials, init, isActive, isSessionActive, isShutdown, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, ping, preShutdown, privilegeSession, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionActive, sessionFinished, sessionFinished, shutdown, signalShutdown, signalStart, start, unprivilegeThreadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.base.service.ADEPT2Service
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, start
-
Constructor Details
-
PVPUpdateManager
The update manager could be called as an ADEPT2Service- Parameters:
configuration- the configuration of the update managerregistry- the registry of the update manager
-
-
Method Details
-
addListener
Description copied from interface:UpdateManagerAdd callback as a new listener for what, using the default priority.- Specified by:
addListenerin interfaceUpdateManager- Parameters:
what- The object that is to be monitoredcallback- The object receiving notification
-
addListener
Description copied from interface:UpdateManagerAdd callback as a new listener for what- Specified by:
addListenerin interfaceUpdateManager- Parameters:
what- The object that is to be monitoredcallback- The object receiving notificationpriority- The priority - smaller numbers lead to earlier calls.
-
removeListener
Description copied from interface:UpdateManagerRemove a callback from the listener list for object what- Specified by:
removeListenerin interfaceUpdateManager- Parameters:
what- The monitored objectcallback- The PropertyChangeListener to be removed
-
firePropertyChange
Notify all interested parties of changes to a Process element- Specified by:
firePropertyChangein interfaceUpdateManager- Parameters:
procElement- The altered Process elementprop- The altered property
-
firePropertyChange
Notify all interested parties of changes to a Process element- Specified by:
firePropertyChangein interfaceUpdateManager- Parameters:
procElement- The altered Process elementprop- The altered propertynewValue- The new value of the property
-
firePropertyChange
Notify all interested parties of changes to a Process element- Specified by:
firePropertyChangein interfaceUpdateManager- Parameters:
procElement- The altered Process elementprop- The altered propertyoldValue- the old value of the propertynewValue- The new value of the property
-
queuePropertyChanges
Send PropertyChangeEvent pce to all listeners for object procElement- Parameters:
procElement- the keypce- the event
-
sendPropertyChanges
public void sendPropertyChanges()Description copied from interface:UpdateManagerSend all queued events and flush the queue.- Specified by:
sendPropertyChangesin interfaceUpdateManager
-
asyncSendPropertyChanges
protected void asyncSendPropertyChanges()Property change events are published asynchronous. The request to execute this method is sent to the default display, rather than the current display of the thread calling sendPropertyChanges() (which would be wrong.)
-