Scala Listener/Observer

后端 未结 4 1241
庸人自扰
庸人自扰 2020-12-28 19:52

Typically, in Java, when I\'ve got an object who\'s providing some sort of notification to other objects, I\'ll employ the Listener/Observer pattern.

Is there a mor

4条回答
  •  既然无缘
    2020-12-28 20:36

    You can use scala.collection.mutable.Publisher and scala.collection.mutable.Subscriber to create a pub/sub implementation

提交回复
热议问题