From ceda35d402161a855102e6145f839a8bbac82ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bon=C3=A9r?= Date: Mon, 31 May 2010 21:21:52 +0200 Subject: [PATCH] Added convenience method to ActorRegistry --- akka-core/src/main/scala/actor/ActorRegistry.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/akka-core/src/main/scala/actor/ActorRegistry.scala b/akka-core/src/main/scala/actor/ActorRegistry.scala index ea77b2c6b7..ee1b6e2b4f 100644 --- a/akka-core/src/main/scala/actor/ActorRegistry.scala +++ b/akka-core/src/main/scala/actor/ActorRegistry.scala @@ -65,6 +65,12 @@ object ActorRegistry extends Logging { all.toList } + /** + * Finds any actor that matches T. + */ + def actorFor[T <: Actor](implicit manifest: Manifest[T]): Option[ActorRef] = + actorsFor[T](manifest).headOption + /** * Finds all actors of the exact type specified by the class passed in as the Class argument. */