Add abstract method for dispatcher name

This commit is contained in:
Peter Vlugter 2011-07-25 13:24:39 +12:00
parent ae35e61a02
commit f406cd98e0
2 changed files with 7 additions and 2 deletions

View file

@ -68,6 +68,11 @@ trait MessageDispatcher {
*/
private[akka] def createMailbox(actorRef: ActorRef): AnyRef
/**
* Name of this dispatcher.
*/
def name: String
/**
* Attaches the specified actorRef to this dispatcher
*/

View file

@ -32,7 +32,7 @@ import scala.annotation.tailrec
object CallingThreadDispatcher {
lazy val global = new CallingThreadDispatcher
lazy val global = new CallingThreadDispatcher("global-calling-thread")
// PRIVATE DATA
@ -104,7 +104,7 @@ object CallingThreadDispatcher {
* @author Roland Kuhn
* @since 1.1
*/
class CallingThreadDispatcher(val warnings: Boolean = true) extends MessageDispatcher {
class CallingThreadDispatcher(val name: String = "calling-thread", val warnings: Boolean = true) extends MessageDispatcher {
import CallingThreadDispatcher._
private[akka] override def createMailbox(actor: ActorRef) = new CallingThreadMailbox