Klasse ResultFuture<R>

java.lang.Object
ch.nolix.core.programcontrol.future.BaseFuture
ch.nolix.core.programcontrol.sequencer.ResultFuture<R>
Typparameter:
R - is the type of the result of a ResultFuture.
Alle implementierten Schnittstellen:
IFuture, IResultFuture<R>, FinishRequestable

public final class ResultFuture<R> extends BaseFuture implements IResultFuture<R>
Version:
2017-09-29
Autor:
Silvan Wyss
  • Methodendetails

    • caughtError

      public boolean caughtError()
      Angegeben von:
      caughtError in Schnittstelle IFuture
      Gibt zurück:
      true if the current IFuture caught an error.
    • getError

      public Throwable getError()
      Angegeben von:
      getError in Schnittstelle IFuture
      Gibt zurück:
      the error of the current IFuture.
    • getResult

      public R getResult()
      Angegeben von:
      getResult in Schnittstelle IResultFuture<R>
      Gibt zurück:
      the result of the current IResultFuture.
    • isFinished

      public boolean isFinished()
      Angegeben von:
      isFinished in Schnittstelle FinishRequestable
      Gibt zurück:
      true if the current FinishRequestable is finished.
    • waitUntilIsFinished

      public void waitUntilIsFinished()
      Lets the current IFuture wait until it is finished.
      Angegeben von:
      waitUntilIsFinished in Schnittstelle IFuture
    • waitUntilIsFinished

      public void waitUntilIsFinished(int timeoutInMilliseconds)
      Lets the current IFuture wait until it is finished within the given timeoutInMilliseconds.
      Angegeben von:
      waitUntilIsFinished in Schnittstelle IFuture
      Parameter:
      timeoutInMilliseconds -
    • waitUntilIsFinishedAndGetResult

      public R waitUntilIsFinishedAndGetResult()
      Waits until the current IResultFuture is finished and returns its result.
      Angegeben von:
      waitUntilIsFinishedAndGetResult in Schnittstelle IResultFuture<R>
      Gibt zurück:
      the result of the current IResultFuture after waiting until it is finished.