Scala has something called a "case class" that can be used to define any number of message types. As for behaviors, that is what actors are for. The things defined here all sound like behaviors to me, and most would be simple to implement with an actor.

Related Query

More Query from same tag