Package com.globalmentor.model
Class RunnableOperation
java.lang.Object
com.globalmentor.beans.BoundPropertyObject
com.globalmentor.model.AbstractTask
com.globalmentor.model.AbstractOperation
com.globalmentor.model.RunnableOperation
- All Implemented Interfaces:
PropertyBindable
,PropertyConstrainable
,Operation
,Task
,Runnable
- Author:
- Garret Wilson
-
Field Summary
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
Fields inherited from interface com.globalmentor.model.Task
STATE_PROPERTY
-
Constructor Summary
-
Method Summary
Methods inherited from class com.globalmentor.model.AbstractOperation
cancel, initialize, isCanceled, run
Methods inherited from class com.globalmentor.model.AbstractTask
getEventListenerManager, getState, setState
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.globalmentor.beans.PropertyConstrainable
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener
-
Constructor Details
-
RunnableOperation
Runnable constructor.- Parameters:
runnable
- The runnable to be decorated by this operation.- Throws:
NullPointerException
- if the given runnable isnull
.
-
-
Method Details
-
execute
public void execute()Executes the operation.This method should not change its state by calling
This method delegates to the decorated runnabledAbstractTask.setState(TaskState)
. If cancellation is needed (to prevent recurrence, for example), aCancelException
should be thrown.Runnable.run()
method.- Specified by:
execute
in classAbstractOperation
-