diff --git a/akka-docs/pending/actor-registry-java.rst b/akka-docs/pending/actor-registry-java.rst index 925b51d012..ef815d857a 100644 --- a/akka-docs/pending/actor-registry-java.rst +++ b/akka-docs/pending/actor-registry-java.rst @@ -7,6 +7,7 @@ ActorRegistry: Finding Actors ----------------------------- Actors can be looked up using the 'akka.actor.Actors.registry()' object. Through this registry you can look up actors by: + * uuid com.eaio.uuid.UUID – this uses the ‘uuid’ field in the Actor class, returns the actor reference for the actor with specified uuid, if one exists, otherwise None * id string – this uses the ‘id’ field in the Actor class, which can be set by the user (default is the class name), returns all actor references to actors with specified id * parameterized type - returns a 'ActorRef[]' with all actors that are a subtype of this specific type @@ -73,5 +74,4 @@ The above actor can be added as listener of registry events: import static akka.actor.Actors.*; ActorRef listener = actorOf(RegistryListener.class).start(); - registry().addListener(listener); - + registry().addListener(listener); \ No newline at end of file diff --git a/akka-docs/pending/actor-registry-scala.rst b/akka-docs/pending/actor-registry-scala.rst index 70defb918c..a87dcc3039 100644 --- a/akka-docs/pending/actor-registry-scala.rst +++ b/akka-docs/pending/actor-registry-scala.rst @@ -7,6 +7,7 @@ ActorRegistry: Finding Actors ----------------------------- Actors can be looked up by using the **akka.actor.Actor.registry: akka.actor.ActorRegistry**. Lookups for actors through this registry can be done by: + * uuid akka.actor.Uuid – this uses the ‘**uuid**’ field in the Actor class, returns the actor reference for the actor with specified uuid, if one exists, otherwise None * id string – this uses the ‘**id**’ field in the Actor class, which can be set by the user (default is the class name), returns all actor references to actors with specified id * specific actor class - returns an '**Array[Actor]**' with all actors of this exact class @@ -78,6 +79,7 @@ The messages sent to this Actor are: So your listener Actor needs to be able to handle these two messages. Example: .. code-block:: scala + import akka.actor.Actor import akka.actor.ActorRegistered; import akka.actor.ActorUnregistered; @@ -95,10 +97,12 @@ So your listener Actor needs to be able to handle these two messages. Example: } The above actor can be added as listener of registry events: + .. code-block:: scala + import akka.actor._ import akka.actor.Actor._ - val listener = actorOf[RegistryListener].start - registry.addListener(listener) + val listener = actorOf[RegistryListener].start + registry.addListener(listener)