org.scalatest.concurrent.Futures

FutureConcept

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]
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. FutureConcept
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. def eitherValue : Option[Either[Throwable, T]]

    Attributes
    abstract
  2. def isCanceled : Boolean

    Indicates 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.

    Attributes
    abstract
  3. def isExpired : Boolean

    Indicates 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 return false.

    Attributes
    abstract

Concrete Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def futureValue (implicit config: PatienceConfig): T

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    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 TestFailedException is configured by the timeout field of the PatienceConfig passed 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 interval field of the PatienceConfig passed implicitly as the last parameter.

    config

    an PatienceConfig object containing timeout and interval parameters that are unused by this method

    returns

    the result of the future once it is ready, if value is defined as a Right

  12. def futureValue (interval: Interval)(implicit config: PatienceConfig): T

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedException is configured by the timeout field of the PatienceConfig passed 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 passed interval parameter.

    This method invokes the overloaded futureValue form with only one (implicit) argument list that contains only one argument, a PatienceConfig, passing a new PatienceConfig with the Interval specified as interval and the Timeout specified as config.timeout.

    interval

    the Interval configuration parameter

    config

    an PatienceConfig object containing timeout and interval parameters that are unused by this method

    returns

    the result of the future once it is ready, if value is defined as a Right

    Attributes
    final
  13. def futureValue (timeout: Timeout)(implicit config: PatienceConfig): T

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedException is configured by the value contained in the passed timeout parameter. The interval to sleep between queries of the future (used only if the future is polled) is configured by the interval field of the PatienceConfig passed implicitly as the last parameter.

    This method invokes the overloaded futureValue form with only one (implicit) argument list that contains only one argument, a PatienceConfig, passing a new PatienceConfig with the Timeout specified as timeout and the Interval specified as config.interval.

    timeout

    the Timeout configuration parameter

    config

    an PatienceConfig object containing timeout and interval parameters that are unused by this method

    returns

    the result of the future once it is ready, if value is defined as a Right

    Attributes
    final
  14. def futureValue (timeout: Timeout, interval: Interval): T

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    Returns the result of this FutureConcept, once it is ready, or throws either the exception returned by the future (i.e., value returned a Left) or TestFailedException.

    The maximum amount of time to wait for the future to become ready before giving up and throwing TestFailedException is configured by the value contained in the passed timeout 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 passed interval parameter.

    This method invokes the overloaded futureValue form with only one (implicit) argument list that contains only one argument, a PatienceConfig, passing a new PatienceConfig with the Timeout specified as timeout and the Interval specified as interval.

    timeout

    the Timeout configuration parameter

    interval

    the Interval configuration parameter

    returns

    the result of the future once it is ready, if value is defined as a Right

    Attributes
    final
  15. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  16. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  17. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  18. def isReadyWithin (timeout: Span)(implicit config: PatienceConfig): Boolean

    Indicates whether this future is ready within the specified timeout.

    Indicates whether this future is ready within the specified timeout.

    If this future

    timeout
    config

    @return

    Attributes
    final
  19. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  20. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  21. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  22. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  23. def toString (): String

    Definition Classes
    AnyRef → Any
  24. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  26. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any