Module org.jhotdraw8.fxbase
Package org.jhotdraw8.fxbase.concurrent
Class SimpleCompletableWorker<V>
java.lang.Object
org.jhotdraw8.fxbase.concurrent.SimpleCompletableWorker<V>
- Type Parameters:
V- the result type
- All Implemented Interfaces:
javafx.concurrent.Worker<V>,CompletableWorker<V>
Simple implementation of
CompletableWorker.-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<Throwable> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyObjectProperty<V> javafx.beans.property.ReadOnlyDoubleProperty -
Nested Class Summary
Nested classes/interfaces inherited from interface javafx.concurrent.Worker
javafx.concurrent.Worker.State -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()voidvoidcompleteExceptionally(Throwable exception) javafx.beans.property.ReadOnlyObjectProperty<Throwable> Returns the completion stage of this worker.Gets the value of theexceptionproperty.Gets the value of themessageproperty.doubleGets the value of theprogressproperty.javafx.concurrent.Worker.StategetState()Gets the value of thestateproperty.getTitle()Gets the value of thetitleproperty.doubleGets the value of thetotalWorkproperty.getValue()Gets the value of thevalueproperty.doubleGets the value of theworkDoneproperty.booleanGets the value of therunningproperty.javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> javafx.beans.property.ReadOnlyStringPropertyjavafx.beans.property.ReadOnlyDoublePropertyvoidupdateException(Throwable value) voidupdateState(javafx.concurrent.Worker.State newValue) This method may be called on any thread.javafx.beans.property.ReadOnlyObjectProperty<V> javafx.beans.property.ReadOnlyDoubleProperty
-
Property Details
-
state
public javafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> stateProperty- Specified by:
statePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
value
- Specified by:
valuePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
exception
- Specified by:
exceptionPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
workDone
public javafx.beans.property.ReadOnlyDoubleProperty workDoneProperty- Specified by:
workDonePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
totalWork
public javafx.beans.property.ReadOnlyDoubleProperty totalWorkProperty- Specified by:
totalWorkPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
progress
public javafx.beans.property.ReadOnlyDoubleProperty progressProperty- Specified by:
progressPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
running
public javafx.beans.property.ReadOnlyBooleanProperty runningProperty- Specified by:
runningPropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
message
public javafx.beans.property.ReadOnlyStringProperty messageProperty- Specified by:
messagePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
title
public javafx.beans.property.ReadOnlyStringProperty titleProperty- Specified by:
titlePropertyin interfacejavafx.concurrent.Worker<V>- See Also:
-
-
Constructor Details
-
SimpleCompletableWorker
-
-
Method Details
-
getCompletionStage
Description copied from interface:CompletableWorkerReturns the completion stage of this worker.The completion stage completes (or fails) on the fxApplicationThread when this worker is set to one of the following states:
Worker.State.FAILEDWorker.State.SUCCEEDED
- Specified by:
getCompletionStagein interfaceCompletableWorker<V>- Returns:
-
getState
public javafx.concurrent.Worker.State getState()Gets the value of thestateproperty.- Specified by:
getStatein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
stateproperty - See Also:
-
stateProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.concurrent.Worker.State> stateProperty()- Specified by:
statePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
stateproperty - See Also:
-
updateState
public void updateState(javafx.concurrent.Worker.State newValue) This method may be called on any thread.- Parameters:
newValue- the new value
-
getValue
Gets the value of thevalueproperty.- Specified by:
getValuein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
valueproperty - See Also:
-
valueProperty
- Specified by:
valuePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
valueproperty - See Also:
-
getException
Gets the value of theexceptionproperty.- Specified by:
getExceptionin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
exceptionproperty - See Also:
-
exceptionProperty
- Specified by:
exceptionPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
exceptionproperty - See Also:
-
getWorkDone
public double getWorkDone()Gets the value of theworkDoneproperty.- Specified by:
getWorkDonein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
workDoneproperty - See Also:
-
workDoneProperty
public javafx.beans.property.ReadOnlyDoubleProperty workDoneProperty()- Specified by:
workDonePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
workDoneproperty - See Also:
-
getTotalWork
public double getTotalWork()Gets the value of thetotalWorkproperty.- Specified by:
getTotalWorkin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
totalWorkproperty - See Also:
-
totalWorkProperty
public javafx.beans.property.ReadOnlyDoubleProperty totalWorkProperty()- Specified by:
totalWorkPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
totalWorkproperty - See Also:
-
getProgress
public double getProgress()Gets the value of theprogressproperty.- Specified by:
getProgressin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
progressproperty - See Also:
-
progressProperty
public javafx.beans.property.ReadOnlyDoubleProperty progressProperty()- Specified by:
progressPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
progressproperty - See Also:
-
isRunning
public boolean isRunning()Gets the value of therunningproperty.- Specified by:
isRunningin interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
runningproperty - See Also:
-
runningProperty
public javafx.beans.property.ReadOnlyBooleanProperty runningProperty()- Specified by:
runningPropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
runningproperty - See Also:
-
getMessage
Gets the value of themessageproperty.- Specified by:
getMessagein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
messageproperty - See Also:
-
messageProperty
public javafx.beans.property.ReadOnlyStringProperty messageProperty()- Specified by:
messagePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
messageproperty - See Also:
-
getTitle
Gets the value of thetitleproperty.- Specified by:
getTitlein interfacejavafx.concurrent.Worker<V>- Property description:
- Returns:
- the value of the
titleproperty - See Also:
-
titleProperty
public javafx.beans.property.ReadOnlyStringProperty titleProperty()- Specified by:
titlePropertyin interfacejavafx.concurrent.Worker<V>- Returns:
- the
titleproperty - See Also:
-
cancel
public boolean cancel()- Specified by:
cancelin interfacejavafx.concurrent.Worker<V>
-
updateException
-
complete
- Specified by:
completein interfaceCompletableWorker<V>
-
completeExceptionally
- Specified by:
completeExceptionallyin interfaceCompletableWorker<V>
-