Schnittstelle IFuture
- Alle Superschnittstellen:
FinishRequestable
- Alle bekannten Unterschnittstellen:
IImageGenerator,IResultFuture<R>
- Alle bekannten Implementierungsklassen:
AbstractFuture,Future,ImageGenerator,ResultFuture
A
IFuture is supposed to be given back when a job is started in
background. A IFuture can always be asked if the background job has
finished or thrown an error.- Version:
- 2019-04-14
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleangetError()booleanbooleanvoidLets the currentIFuturewait until it is finished.voidwaitUntilIsFinished(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished within the given timeoutInMilliseconds.voidLets the currentIFuturewait until it is finished successfully.voidwaitUntilIsFinishedSuccessfully(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished successfully within the given timeoutInMilliseconds.Von Schnittstelle geerbte Methoden ch.nolix.coreapi.programcontrol.process.FinishRequestable
isFinished, isRunning
-
Methodendetails
-
caughtError
boolean caughtError()- Gibt zurück:
- true if the current
IFuturecaught an error.
-
getError
Throwable getError()- Gibt zurück:
- the error of the current
IFuture.
-
isFinishedSuccessfully
boolean isFinishedSuccessfully()- Gibt zurück:
- true if the current
IFutureis finished successfully.
-
isFinishedWithError
boolean isFinishedWithError()- Gibt zurück:
- true if the current
IFutureis finished with an error.
-
waitUntilIsFinished
void waitUntilIsFinished()Lets the currentIFuturewait until it is finished. -
waitUntilIsFinished
void waitUntilIsFinished(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished within the given timeoutInMilliseconds.- Parameter:
timeoutInMilliseconds-
-
waitUntilIsFinishedSuccessfully
void waitUntilIsFinishedSuccessfully()Lets the currentIFuturewait until it is finished successfully.- Löst aus:
RuntimeException- if the currentIFuturecatches an error.
-
waitUntilIsFinishedSuccessfully
void waitUntilIsFinishedSuccessfully(int timeoutInMilliseconds) Lets the currentIFuturewait until it is finished successfully within the given timeoutInMilliseconds.- Parameter:
timeoutInMilliseconds-- Löst aus:
RuntimeException- if the currentIFuturecatches an error.RuntimeException- if the currentIFuturereached the given timeoutInMilliseconds before having finished.
-