Added convenience method to ActorRegistry

This commit is contained in:
Jonas Bonér 2010-05-31 21:21:52 +02:00
parent 3ad111876a
commit ceda35d402

View file

@ -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.
*/