class ZTestActivityEnvironment[+R] extends AnyRef
- Alphabetic
- By Inheritance
- ZTestActivityEnvironment
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- implicit lazy val activityRunOptions: ZActivityRunOptions[R]
- def addActivityImplementation[A <: AnyRef](activity: A)(implicit arg0: ExtendsActivity[A]): UIO[Unit]
Registers activity implementations to test.
Registers activity implementations to test. Use newActivityStub to create stubs that can be used to invoke them.
Implementations that share a worker must implement different interfaces as an activity type is identified by the activity interface, not by the implementation.
- Exceptions thrown
TypeAlreadyRegisteredException
if one of the activity types is already registered
- def addActivityImplementationService[A <: AnyRef](implicit arg0: ExtendsActivity[A], arg1: Tag[A]): URIO[A, Unit]
Registers activity implementations to test.
Registers activity implementations to test. Use newActivityStub to create stubs that can be used to invoke them.
Implementations that share a worker must implement different interfaces as an activity type is identified by the activity interface, not by the implementation.
- Exceptions thrown
TypeAlreadyRegisteredException
if one of the activity types is already registered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newActivityStub[A <: AnyRef](options: ZActivityOptions)(implicit arg0: IsActivity[A], arg1: ClassTag[A]): UIO[A]
Creates a stub that can be used to invoke activities registered through addActivityImplementation
Creates a stub that can be used to invoke activities registered through addActivityImplementation
- A
Type of the activity interface.
- options
activity options
- returns
The stub builder for the activity.
- Note
it's not a zio.temporal.activity.ZActivityStub because the activity is invoked locally. Wrapping method invocation into zio.temporal.activity.ZActivityStub.execute is not required
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def requestCancelActivity(): UIO[Unit]
Requests activity cancellation.
Requests activity cancellation. The cancellation is going to be delivered to the activity on the next heartbeat.
- def setActivityHeartbeatListener[T](listener: (T) => Unit)(implicit arg0: TypeIsSpecified[T], arg1: JavaTypeTag[T]): UIO[Unit]
Sets a listener that is called every time an activity implementation heartbeats through zio.temporal.activity.ZActivityExecutionContext.heartbeat
Sets a listener that is called every time an activity implementation heartbeats through zio.temporal.activity.ZActivityExecutionContext.heartbeat
- T
type of the details passed to the zio.temporal.activity.ZActivityExecutionContext.heartbeat
- listener
listener to register.
- def setHeartbeatDetails[T](details: T): UIO[Unit]
Sets heartbeat details for the next activity execution.
Sets heartbeat details for the next activity execution. The next activity called from this TestActivityEnvironment will be able to access this value using zio.temporal.activity.ZActivityExecutionContext.heartbeat. This value is cleared upon execution.
- T
Type of the heartbeat details.
- details
The details object to make available to the next activity call.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val toJava: TestActivityEnvironment
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def newActivityStub[A <: AnyRef](implicit arg0: IsActivity[A], arg1: ClassTag[A]): ZActivityStubBuilderInitial[UIO[A]]
Creates a stub that can be used to invoke activities registered through addActivityImplementation
Creates a stub that can be used to invoke activities registered through addActivityImplementation
- A
Type of the activity interface.
- returns
The stub builder for the activity.
- Annotations
- @deprecated
- Deprecated
(Since version 0.6.0) Use newLocalActivityStub accepting ZLocalActivityOptions
- Note
it's not a zio.temporal.activity.ZActivityStub because the activity is invoked locally. Wrapping method invocation into zio.temporal.activity.ZActivityStub.execute is not required