final class StatefulStatus extends Status with Serializable
Status implementation that can change its state over time.
A StatefulStatus begins its life in a successful state, and will remain successful unless setFailed is called.
Once setFailed is called, the status will remain at failed. The setFailed method can be called multiple times (even
though invoking it once is sufficient to permanently set the status to failed), but only up until setCompleted has been called.
After setCompleted has been called, any invocation of setFailed will be greeted with an IllegalStateException.
Instances of this class are thread safe.
- Source
- Status.scala
- Alphabetic
- By Inheritance
- StatefulStatus
- Serializable
- Status
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StatefulStatus()
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
isCompleted: Boolean
Non-blocking call that returns
trueifsetCompletedhas been invoked on this instance,falseotherwise.Non-blocking call that returns
trueifsetCompletedhas been invoked on this instance,falseotherwise.- returns
trueif the test or suite run is already completed,falseotherwise.
- Definition Classes
- StatefulStatus → Status
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
setCompleted(): Unit
Sets the status to completed.
Sets the status to completed.
This method may be invoked repeatedly, even though invoking it once is sufficient to set the state of the
Statusto completed. -
def
setFailed(): Unit
Sets the status to failed without changing the completion status.
Sets the status to failed without changing the completion status.
This method may be invoked repeatedly, even though invoking it once is sufficient to set the state of the
Statusto failed, but only up untilsetCompletedhas been called. OncesetCompletedhas been called, invoking this method will result in a thrownIllegalStateException.- Exceptions thrown
IllegalStateExceptionif this method is invoked on this instance aftersetCompletedhas been invoked on this instance.
-
def
succeeds(): Boolean
Blocking call that waits until completion, as indicated by an invocation of
setCompletedon this instance, then returns returnsfalseifsetFailedwas called on this instance, else returnstrue.Blocking call that waits until completion, as indicated by an invocation of
setCompletedon this instance, then returns returnsfalseifsetFailedwas called on this instance, else returnstrue.- returns
trueif no tests failed and no suites aborted,falseotherwise
- Definition Classes
- StatefulStatus → Status
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
waitUntilCompleted(): Unit
Blocking call that returns only after
setCompletedhas been invoked on thisStatefulStatusinstance.Blocking call that returns only after
setCompletedhas been invoked on thisStatefulStatusinstance.- Definition Classes
- StatefulStatus → Status
-
def
whenCompleted(f: (Boolean) ⇒ Unit): Unit
Registers the passed function to be executed when this status completes.
Registers the passed function to be executed when this status completes.
You may register multiple functions, which on completion will be executed in an undefined order.
- Definition Classes
- StatefulStatus → Status