final case class AskInitiated[Req, Res, T](target: RecipientRef[Req], responseTimeout: FiniteDuration, responseClass: Class[Res])(askMessage: Req, forwardResponse: (Try[Res]) => Unit, mapResponse: (Try[Res]) => T) extends Effect with Product with Serializable

The behavior initiated an ask via its context. A response or timeout may be sent via this effect to the asking behavior: this effect enforces that at most one response or timeout is sent. Alternatively, one may, after obtaining the effect, test the response adaptation function (without sending a message to the asking behavior) arbitrarily many times via the 'adaptResponse and adaptTimeout methods.

The 'replyToRef' is exposed so that the target inbox can expect the actual message sent to initiate the ask.

Note that this requires the ask to be initiated via the ActorContext. The Future returning ask is not testable in the BehaviorTestKit.

Source
Effect.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AskInitiated
  2. Serializable
  3. Product
  4. Equals
  5. Effect
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AskInitiated(target: RecipientRef[Req], responseTimeout: FiniteDuration, responseClass: Class[Res])(askMessage: Req, forwardResponse: (Try[Res]) => Unit, mapResponse: (Try[Res]) => T)

Value Members

  1. def adaptResponse(response: Res): T
  2. def adaptTimeout: T
  3. def adaptTimeout(msg: String): T
  4. val askMessage: Req
  5. def getResponseTimeout: Duration

    Java API

  6. def productElementNames: Iterator[String]
    Definition Classes
    Product
  7. def respondWith(response: Res): Unit
  8. val responseClass: Class[Res]
  9. val responseTimeout: FiniteDuration
  10. val target: RecipientRef[Req]
  11. def timeout(): Unit