Package akka.actor.testkit.typed.javadsl
Class Effects$
- java.lang.Object
-
- akka.actor.testkit.typed.javadsl.Effects$
-
public class Effects$ extends java.lang.Object
Factories 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 Instance Methods Concrete Methods Modifier and Type Method Description <Req,Res,T>
Effect.AskInitiated<Req,Res,T>askInitiated(RecipientRef<Req> target, java.time.Duration responseTimeout, java.lang.Class<Res> responseClass, java.lang.Class<T> messageClass)
The behavior initiated an ask via its context.Effect.NoEffects
noEffects()
Used to represent an empty list of effects - in other words, the behavior didn't do anything observable<T> Effect.ReceiveTimeoutSet<T>
receiveTimeoutSet(java.time.Duration d, T message)
The behavior set a new receive timeout, withmessage
as timeout notification<U> Effect.Scheduled<U>
scheduled(java.time.Duration delay, ActorRef<U> target, U message)
The behavior usedcontext.schedule
to schedulemessage
to be sent totarget
afterdelay
FIXME what about events scheduled through the scheduler?<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<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<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<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<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 propsEffect.Stopped
stopped(java.lang.String childName)
The behavior stoppedchildName
<U> Effect.TimerScheduled<U>
timerScheduled(java.lang.Object key, U msg, java.time.Duration delay, akka.actor.testkit.typed.Effect.TimerScheduled.TimerMode mode, boolean overriding, Effect send)
<T> Effect.Unwatched<T>
unwatched(ActorRef<T> other)
The behavior stopped watchingother
, throughcontext.unwatch(other)
<T> Effect.Watched<T>
watched(ActorRef<T> other)
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 Detail
-
MODULE$
public static final Effects$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
askInitiated
public <Req,Res,T> Effect.AskInitiated<Req,Res,T> askInitiated(RecipientRef<Req> target, java.time.Duration responseTimeout, java.lang.Class<Res> responseClass, java.lang.Class<T> messageClass)
The behavior initiated an ask via its context. Note that the effect returned from this method should only be used to compare with an actual effect.
-
spawned
public <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 <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 <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 <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 <T> Effect.SpawnedAnonymous<T> spawnedAnonymous(Behavior<T> behavior)
The behavior spawned an anonymous child with the given behavior with no specific props
-
spawnedAnonymous
public <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 <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 <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 Effect.Stopped stopped(java.lang.String childName)
The behavior stoppedchildName
-
watched
public <T> Effect.Watched<T> watched(ActorRef<T> other)
The behavior started watchingother
, throughcontext.watch(other)
-
watchedWith
public <U,T> Effect.WatchedWith<U,T> watchedWith(ActorRef<U> other, T message)
The behavior started watchingother
, throughcontext.watchWith(other, message)
-
unwatched
public <T> Effect.Unwatched<T> unwatched(ActorRef<T> other)
The behavior stopped watchingother
, throughcontext.unwatch(other)
-
receiveTimeoutSet
public <T> Effect.ReceiveTimeoutSet<T> receiveTimeoutSet(java.time.Duration d, T message)
The behavior set a new receive timeout, withmessage
as timeout notification
-
scheduled
public <U> Effect.Scheduled<U> scheduled(java.time.Duration delay, ActorRef<U> target, U message)
The behavior usedcontext.schedule
to schedulemessage
to be sent totarget
afterdelay
FIXME what about events scheduled through the scheduler?
-
timerScheduled
public <U> Effect.TimerScheduled<U> timerScheduled(java.lang.Object key, U msg, java.time.Duration delay, akka.actor.testkit.typed.Effect.TimerScheduled.TimerMode mode, boolean overriding, Effect send)
-
noEffects
public Effect.NoEffects noEffects()
Used to represent an empty list of effects - in other words, the behavior didn't do anything observable
-
-