This is the first step towards more type-safety in Actor interactions, comprising: * generic ActorRef[T] that only accepts T messages * generic ActorSystem[T] extends ActorRef[T] (sending to the guardian, whose Props[T] are provided for ActorSystem construction) * removed the Actor trait: everything in there has been made into messages and signals * new Behavior[T] abstraction that consumes messages (of type T) or Signals (lifecycle hooks, Terminated, ReceiveTimeout, Failed), producing the next Behavior[T] as the result each time * the ask pattern is provided and yields properly typed Futures * variants of ActorContext are provided for synchronous testing of Behaviors All of this is implemented without touching code outside akka-typed (apart from making guardianProps configurable), creating wrapper objects around ActorRef, ActorContext, ActorSystem, Props and providing an Actor implementation that just runs a Behavior.
13 lines
249 B
Scala
13 lines
249 B
Scala
import akka.{ AkkaBuild, Formatting, OSGi, Unidoc, Dependencies }
|
|
import com.typesafe.tools.mima.plugin.MimaKeys
|
|
|
|
AkkaBuild.defaultSettings
|
|
|
|
AkkaBuild.experimentalSettings
|
|
|
|
Formatting.formatSettings
|
|
|
|
Unidoc.scaladocSettings
|
|
|
|
Unidoc.javadocSettings
|
|
|