trait FutureConcept[T] extends AnyRef
Concept trait for futures, instances of which are passed to the whenReady
methods of trait Futures.
See the documentation for trait Futures for the details on the syntax this trait
provides for testing with futures.
- Self Type
- FutureConcept[T]
- Source
- Futures.scala
- Alphabetic
- By Inheritance
- FutureConcept
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
-   abstract  def eitherValue: Option[Either[Throwable, T]]Queries this future for its value. Queries this future for its value. If the future is not ready, this method will return None. If ready, it will either return an exception or aT.
-   abstract  def isCanceled: BooleanIndicates whether this future has been canceled. Indicates whether this future has been canceled. If the underlying future does not support the concept of cancellation, this method must always return false.
-   abstract  def isExpired: BooleanIndicates whether this future has expired (timed out). Indicates whether this future has expired (timed out). The timeout detected by this method is different from the timeout supported by whenReady. This timeout is a timeout of the underlying future. If the underlying future does not support timeouts, this method must always returnfalse.
Concrete Value Members
-   final  def !=(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def ##: Int- Definition Classes
- AnyRef → Any
 
-   final  def ==(arg0: Any): Boolean- Definition Classes
- AnyRef → Any
 
-   final  def asInstanceOf[T0]: T0- Definition Classes
- Any
 
-    def clone(): AnyRef- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
 
-   final  def eq(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-    def equals(arg0: AnyRef): Boolean- Definition Classes
- AnyRef → Any
 
-    def finalize(): Unit- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
 
-    def futureValue(implicit config: Futures.PatienceConfig, pos: Position): TReturns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,futureValuereturned aLeft) orTestFailedException.Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,futureValuereturned aLeft) orTestFailedException.This trait's implementation of this method queries the future repeatedly until it either is ready, or a configured maximum amount of time has passed, sleeping a configured interval between attempts; and when ready, returns the future's value. For greater efficiency, implementations of this trait may override this method so that it blocks the specified timeout while waiting for the result, if the underlying future supports this. The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedExceptionis configured by thetimeoutfield of thePatienceConfigpassed implicitly as the last parameter. The interval to sleep between queries of the future (used only if the future is polled) is configured by theintervalfield of thePatienceConfigpassed implicitly as the last parameter.If the eitherValuemethod of the underlying Scala future returns ascala.Somecontaining ascala.util.Failurecontaining ajava.util.concurrent.ExecutionException, and this exception contains a non-nullcause, that cause will be included in theTestFailedExceptionas its cause. TheExecutionExceptionwill be be included as theTestFailedException's cause only if theExecutionException's cause isnull.- config
- a - PatienceConfigobject containing- timeoutand- intervalparameters that are unused by this method
- returns
- the result of the future once it is ready, if - valueis defined as a- Right
 - Exceptions thrown
- TestFailedExceptionif the future is cancelled, expires, or is still not ready after the specified timeout has been exceeded- Throwableif once ready, the- valueof this future is defined as a- Left(in this case, this method throws that same exception)
 
-   final  def futureValue(interval: Interval)(implicit config: Futures.PatienceConfig, pos: Position): TReturns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,eitherValuereturned aLeft) orTestFailedException.Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,eitherValuereturned aLeft) orTestFailedException.The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedExceptionis configured by thetimeoutfield of thePatienceConfigpassed implicitly as the last parameter. The interval to sleep between queries of the future (used only if the future is polled) is configured by the value contained in the passedintervalparameter.This method invokes the overloaded futureValueform with only one (implicit) argument list that contains only one argument, aPatienceConfig, passing a newPatienceConfigwith theIntervalspecified asintervaland theTimeoutspecified asconfig.timeout.If the eitherValuemethod of the underlying Scala future returns ascala.Somecontaining ascala.util.Failurecontaining ajava.util.concurrent.ExecutionException, and this exception contains a non-nullcause, that cause will be included in theTestFailedExceptionas its cause. TheExecutionExceptionwill be be included as theTestFailedException's cause only if theExecutionException's cause isnull.- interval
- the - Intervalconfiguration parameter
- config
- an - PatienceConfigobject containing- timeoutand- intervalparameters that are unused by this method
- returns
- the result of the future once it is ready, if - valueis defined as a- Right
 - Exceptions thrown
- TestFailedExceptionif the future is cancelled, expires, or is still not ready after the specified timeout has been exceeded- Throwableif once ready, the- valueof this future is defined as a- Left(in this case, this method throws that same exception)
 
-   final  def futureValue(timeout: Timeout)(implicit config: Futures.PatienceConfig, pos: Position): TReturns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,valuereturned aLeft) orTestFailedException.Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,valuereturned aLeft) orTestFailedException.The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedExceptionis configured by the value contained in the passedtimeoutparameter. The interval to sleep between queries of the future (used only if the future is polled) is configured by theintervalfield of thePatienceConfigpassed implicitly as the last parameter.This method invokes the overloaded futureValueform with only one (implicit) argument list that contains only one argument, aPatienceConfig, passing a newPatienceConfigwith theTimeoutspecified astimeoutand theIntervalspecified asconfig.interval.If the eitherValuemethod of the underlying Scala future returns ascala.Somecontaining ascala.util.Failurecontaining ajava.util.concurrent.ExecutionException, and this exception contains a non-nullcause, that cause will be included in theTestFailedExceptionas its cause. TheExecutionExceptionwill be be included as theTestFailedException's cause only if theExecutionException's cause isnull.- timeout
- the - Timeoutconfiguration parameter
- config
- an - PatienceConfigobject containing- timeoutand- intervalparameters that are unused by this method
- returns
- the result of the future once it is ready, if - eitherValueis defined as a- Right
 - Exceptions thrown
- TestFailedExceptionif the future is cancelled, expires, or is still not ready after the specified timeout has been exceeded- Throwableif once ready, the- eitherValueof this future is defined as a- Left(in this case, this method throws that same exception)
 
-   final  def futureValue(timeout: Timeout, interval: Interval)(implicit pos: Position): TReturns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,valuereturned aLeft) orTestFailedException.Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e.,valuereturned aLeft) orTestFailedException.The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedExceptionis configured by the value contained in the passedtimeoutparameter. The interval to sleep between queries of the future (used only if the future is polled) is configured by the value contained in the passedintervalparameter.This method invokes the overloaded futureValueform with only one (implicit) argument list that contains only one argument, aPatienceConfig, passing a newPatienceConfigwith theTimeoutspecified astimeoutand theIntervalspecified asinterval.If the eitherValuemethod of the underlying Scala future returns ascala.Somecontaining ascala.util.Failurecontaining ajava.util.concurrent.ExecutionException, and this exception contains a non-nullcause, that cause will be included in theTestFailedExceptionas its cause. TheExecutionExceptionwill be be included as theTestFailedException's cause only if theExecutionException's cause isnull.- timeout
- the - Timeoutconfiguration parameter
- interval
- the - Intervalconfiguration parameter
- returns
- the result of the future once it is ready, if - valueis defined as a- Right
 - Exceptions thrown
- TestFailedExceptionif the future is cancelled, expires, or is still not ready after the specified timeout has been exceeded- Throwableif once ready, the- valueof this future is defined as a- Left(in this case, this method throws that same exception)
 
-   final  def getClass(): Class[_ <: AnyRef]- Definition Classes
- AnyRef → Any
- Annotations
- @native()
 
-    def hashCode(): Int- Definition Classes
- AnyRef → Any
- Annotations
- @native()
 
-   final  def isInstanceOf[T0]: Boolean- Definition Classes
- Any
 
-   final  def isReadyWithin(timeout: Span)(implicit config: Futures.PatienceConfig, pos: Position): BooleanIndicates whether this future is ready within the specified timeout. Indicates whether this future is ready within the specified timeout. If the eitherValuemethod of the underlying Scala future returns ascala.Somecontaining ascala.util.Failurecontaining ajava.util.concurrent.ExecutionException, and this exception contains a non-nullcause, that cause will be included in theTestFailedExceptionas its cause. TheExecutionExceptionwill be be included as theTestFailedException's cause only if theExecutionException's cause isnull.
-   final  def ne(arg0: AnyRef): Boolean- Definition Classes
- AnyRef
 
-   final  def notify(): Unit- Definition Classes
- AnyRef
- Annotations
- @native()
 
-   final  def notifyAll(): Unit- Definition Classes
- AnyRef
- Annotations
- @native()
 
-   final  def synchronized[T0](arg0: => T0): T0- Definition Classes
- AnyRef
 
-    def toString(): String- Definition Classes
- AnyRef → Any
 
-   final  def wait(): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
 
-   final  def wait(arg0: Long, arg1: Int): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
 
-   final  def wait(arg0: Long): Unit- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()