Class Effects$
java.lang.Object
org.apache.pekko.actor.testkit.typed.scaladsl.Effects$
Factories for behavior effects for
BehaviorTestKit, each effect has a suitable equals and can be used to compare
actual effects to expected ones.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Req,Res, T>
Effect.AskInitiated<Req,Res, T> askInitiated(RecipientRef<Req> target, scala.concurrent.duration.FiniteDuration responseTimeout, Class<Res> responseClass) The behavior initiated an ask via its context.Used to represent an empty list of effects - in other words, the behavior didn't do anything observable<T> Effect.ReceiveTimeoutSet<T>receiveTimeoutSet(scala.concurrent.duration.FiniteDuration d, T message) The behavior set a new receive timeout, withmessageas timeout notification<U> Effect.Scheduled<U>The behavior usedcontext.scheduleto schedulemessageto be sent totargetafterdelayFIXME what about events scheduled through the scheduler?<T> Effect.Spawned<T>The behavior spawned a named child with the given behavior with no specific props<T> Effect.Spawned<T>The behavior spawned a named child with the given behavior with no specific props<T> Effect.Spawned<T>The behavior spawned a named child with the given behavior and specific props<T> Effect.Spawned<T>The behavior spawned a named child with the given behavior and specific props<T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior) The behavior spawned an anonymous child with the given behavior with no specific props<T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior, ActorRef<T> ref) The behavior spawned an anonymous child with the given behavior with no specific props<T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior, Props props) The behavior spawned an anonymous child with the given behavior with specific props<T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior, Props props, ActorRef<T> ref) The behavior spawned an anonymous child with the given behavior with specific propsThe behavior stoppedchildName<T> Effect.Unwatched<T>The behavior stopped watchingother, throughcontext.unwatch(other)<T> Effect.Watched<T>The behavior started watchingother, throughcontext.watch(other)<U,T> Effect.WatchedWith<U, T> watchedWith(ActorRef<U> other, T message) The behavior started watchingother, throughcontext.watchWith(other, message)
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Effects$
public Effects$()
-
-
Method Details
-
askInitiated
public <Req,Res, Effect.AskInitiated<Req,T> Res, askInitiatedT> (RecipientRef<Req> target, scala.concurrent.duration.FiniteDuration responseTimeout, Class<Res> responseClass) The behavior initiated an ask via its context. Note that the effect returned from this method should only be used for an equality comparison with the actual effect from running the behavior.- Since:
- 1.3.0
-
spawned
The behavior spawned a named child with the given behavior with no specific props -
spawned
The behavior spawned a named child with the given behavior with no specific props -
spawned
The behavior spawned a named child with the given behavior and specific props -
spawned
public <T> Effect.Spawned<T> spawned(Behavior<T> behavior, String childName, Props props, ActorRef<T> ref) The behavior spawned a named child with the given behavior and specific props -
spawnedAnonymous
The behavior spawned an anonymous child with the given behavior with no specific props -
spawnedAnonymous
The behavior spawned an anonymous child with the given behavior with no specific props -
spawnedAnonymous
The behavior spawned an anonymous child with the given behavior with specific props -
spawnedAnonymous
public <T> Effect.SpawnedAnonymous<T> spawnedAnonymous(Behavior<T> behavior, Props props, ActorRef<T> ref) The behavior spawned an anonymous child with the given behavior with specific props -
stopped
The behavior stoppedchildName -
watched
The behavior started watchingother, throughcontext.watch(other) -
watchedWith
The behavior started watchingother, throughcontext.watchWith(other, message) -
unwatched
The behavior stopped watchingother, throughcontext.unwatch(other) -
receiveTimeoutSet
public <T> Effect.ReceiveTimeoutSet<T> receiveTimeoutSet(scala.concurrent.duration.FiniteDuration d, T message) The behavior set a new receive timeout, withmessageas timeout notification -
scheduled
public <U> Effect.Scheduled<U> scheduled(scala.concurrent.duration.FiniteDuration delay, ActorRef<U> target, U message) The behavior usedcontext.scheduleto schedulemessageto be sent totargetafterdelayFIXME what about events scheduled through the scheduler? -
noEffects
Used to represent an empty list of effects - in other words, the behavior didn't do anything observable
-