Class Effects
- java.lang.Object
-
- org.apache.pekko.actor.testkit.typed.scaladsl.Effects
-
public class Effects extends java.lang.ObjectFactories for behavior effects forBehaviorTestKit, each effect has a suitable equals and can be used to compare actual effects to expected ones.
-
-
Constructor Summary
Constructors Constructor Description Effects()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Effect.NoEffectsnoEffects()Used to represent an empty list of effects - in other words, the behavior didn't do anything observablestatic <T> Effect.ReceiveTimeoutSet<T>receiveTimeoutSet(scala.concurrent.duration.FiniteDuration d, T message)The behavior set a new receive timeout, withmessageas timeout notificationstatic <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?static <T> Effect.Spawned<T>spawned(Behavior<T> behavior, java.lang.String childName)The behavior spawned a named child with the given behavior with no specific propsstatic <T> Effect.Spawned<T>spawned(Behavior<T> behavior, java.lang.String childName, ActorRef<T> ref)The behavior spawned a named child with the given behavior with no specific propsstatic <T> Effect.Spawned<T>spawned(Behavior<T> behavior, java.lang.String childName, Props props)The behavior spawned a named child with the given behavior and specific propsstatic <T> Effect.Spawned<T>spawned(Behavior<T> behavior, java.lang.String childName, Props props, ActorRef<T> ref)The behavior spawned a named child with the given behavior and specific propsstatic <T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior)The behavior spawned an anonymous child with the given behavior with no specific propsstatic <T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior, ActorRef<T> ref)The behavior spawned an anonymous child with the given behavior with no specific propsstatic <T> Effect.SpawnedAnonymous<T>spawnedAnonymous(Behavior<T> behavior, Props props)The behavior spawned an anonymous child with the given behavior with specific propsstatic <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 propsstatic Effect.Stoppedstopped(java.lang.String childName)The behavior stoppedchildNamestatic <T> Effect.Unwatched<T>unwatched(ActorRef<T> other)The behavior stopped watchingother, throughcontext.unwatch(other)static <T> Effect.Watched<T>watched(ActorRef<T> other)The behavior started watchingother, throughcontext.watch(other)static <U,T>
Effect.WatchedWith<U,T>watchedWith(ActorRef<U> other, T message)The behavior started watchingother, throughcontext.watchWith(other, message)
-
-
-
Method Detail
-
spawned
public static <T> Effect.Spawned<T> spawned(Behavior<T> behavior, java.lang.String childName)
The behavior spawned a named child with the given behavior with no specific props
-
spawned
public static <T> Effect.Spawned<T> spawned(Behavior<T> behavior, java.lang.String childName, ActorRef<T> ref)
The behavior spawned a named child with the given behavior with no specific props
-
spawned
public static <T> Effect.Spawned<T> spawned(Behavior<T> behavior, java.lang.String childName, Props props)
The behavior spawned a named child with the given behavior and specific props
-
spawned
public static <T> Effect.Spawned<T> spawned(Behavior<T> behavior, java.lang.String childName, Props props, ActorRef<T> ref)
The behavior spawned a named child with the given behavior and specific props
-
spawnedAnonymous
public static <T> Effect.SpawnedAnonymous<T> spawnedAnonymous(Behavior<T> behavior)
The behavior spawned an anonymous child with the given behavior with no specific props
-
spawnedAnonymous
public static <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
-
spawnedAnonymous
public static <T> Effect.SpawnedAnonymous<T> spawnedAnonymous(Behavior<T> behavior, Props props)
The behavior spawned an anonymous child with the given behavior with specific props
-
spawnedAnonymous
public static <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
public static Effect.Stopped stopped(java.lang.String childName)
The behavior stoppedchildName
-
watched
public static <T> Effect.Watched<T> watched(ActorRef<T> other)
The behavior started watchingother, throughcontext.watch(other)
-
watchedWith
public static <U,T> Effect.WatchedWith<U,T> watchedWith(ActorRef<U> other, T message)
The behavior started watchingother, throughcontext.watchWith(other, message)
-
unwatched
public static <T> Effect.Unwatched<T> unwatched(ActorRef<T> other)
The behavior stopped watchingother, throughcontext.unwatch(other)
-
receiveTimeoutSet
public static <T> Effect.ReceiveTimeoutSet<T> receiveTimeoutSet(scala.concurrent.duration.FiniteDuration d, T message)
The behavior set a new receive timeout, withmessageas timeout notification
-
scheduled
public static <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
public static Effect.NoEffects noEffects()
Used to represent an empty list of effects - in other words, the behavior didn't do anything observable
-
-