summaryrefslogtreecommitdiff
path: root/test/disabled/presentation/akka/src/akka/routing/Listeners.scala
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2017-03-20 17:13:56 -0700
committerSeth Tisue <seth@tisue.net>2017-03-20 17:24:33 -0700
commit25048bc73741846107c18ed01e0e9f6f07785379 (patch)
treec1c9d60002fec74fc13af354e51bb3d688b33902 /test/disabled/presentation/akka/src/akka/routing/Listeners.scala
parent0563c4b23cdc7ed6c05e9defe2a675df4d838347 (diff)
downloadscala-25048bc73741846107c18ed01e0e9f6f07785379.tar.gz
scala-25048bc73741846107c18ed01e0e9f6f07785379.tar.bz2
scala-25048bc73741846107c18ed01e0e9f6f07785379.zip
rm -r test/{flaky,disabled*,checker-tests,support,debug}
keeping this stuff, somewhere, forever and ever and ever is what version control is for. who dares disturb the ancient and accursed tomb of all this code...?
Diffstat (limited to 'test/disabled/presentation/akka/src/akka/routing/Listeners.scala')
-rw-r--r--test/disabled/presentation/akka/src/akka/routing/Listeners.scala37
1 files changed, 0 insertions, 37 deletions
diff --git a/test/disabled/presentation/akka/src/akka/routing/Listeners.scala b/test/disabled/presentation/akka/src/akka/routing/Listeners.scala
deleted file mode 100644
index d8a537731d..0000000000
--- a/test/disabled/presentation/akka/src/akka/routing/Listeners.scala
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (C) 2009-2011 Scalable Solutions AB <http://scalablesolutions.se>
- */
-
-package akka.routing
-
-import akka.actor.{ Actor, ActorRef }
-import java.util.concurrent.ConcurrentSkipListSet
-import scala.collection.convert.wrapAsScala._
-
-sealed trait ListenerMessage
-case class Listen(listener: ActorRef) extends ListenerMessage
-case class Deafen(listener: ActorRef) extends ListenerMessage
-case class WithListeners(f: (ActorRef) => Unit) extends ListenerMessage
-
-/**
- * Listeners is a generic trait to implement listening capability on an Actor.
- * <p/>
- * Use the <code>gossip(msg)</code> method to have it sent to the listeners.
- * <p/>
- * Send <code>Listen(self)</code> to start listening.
- * <p/>
- * Send <code>Deafen(self)</code> to stop listening.
- * <p/>
- * Send <code>WithListeners(fun)</code> to traverse the current listeners.
- */
-trait Listeners { self: Actor =>
- private val listeners = new ConcurrentSkipListSet[ActorRef]
-
- protected def listenerManagement: Receive = {
- case Listen(l) => listeners add l
- case Deafen(l) => listeners remove l
- case WithListeners(f) => listeners foreach f
- }
-
- protected def gossip(msg: Any) = listeners foreach (_ ! msg)
-}