Make FSM.receive overridable
FSM actors cannot be modified with stackable traits like
because FSM.receive is implemented as final method. Making FSM.receive overridable (i.e. non-final) would also open up FSM actors for composition with stackable traits. See also https://groups.google.com/d/msg/akka-user/3ySTQvS0vFE/4CmCB7dct9MJ.
trait MyStackableTrait extends Actor {
abstract override def receive: Receive = {
case msg => {
// do some extra work
// ...
super.receive(msg)
}
}
}
because FSM.receive is implemented as final method. Making FSM.receive overridable (i.e. non-final) would also open up FSM actors for composition with stackable traits. See also https://groups.google.com/d/msg/akka-user/3ySTQvS0vFE/4CmCB7dct9MJ.
Leave a comment