Hi, Heiko,
Thanks a lot for the response. I saw that in the manual (java
though,
http://doc.akka.io/docs/akka/2.3.2/java/untyped-actors.html#actorselection-java),
but couldn't understand what exactly is happening. The sample code of
class "Follower" does not have any comment, and does not seem match to the
description above.
For example, the text description says "use the getSender() reference
blah blah", but I don't see getSender() being called in the class.
Basically, I do see in this example that we are sending an Identity message
to an ActorSelection, but I don't see any place obtaining the retrieved
ActorRef and make use of it.
It would be much easier to understand if this example was in a runnable
example. Do we have such an example in the tutorial example projects?
Thank you very much~!
On Thu, Apr 10, 2014 at 12:20 AM, Heiko Seeberger <[email protected]
> wrote:
>
> http://doc.akka.io/docs/akka/2.3.2/scala/actors.html#Identifying_Actors_via_Actor_Selection
>
>
> On Thu, Apr 10, 2014 at 7:27 AM, Atom Cong <[email protected]> wrote:
>
>> Hi, Akka experts,
>>
>> Patrik's solution seems make sense to me. But I couldn't figure out
>> how to code it up, and what exactly APIs I should use to do the series of
>> operations.
>>
>> Can anyone point me to a code example if there is any?
>>
>> Thank you very much.
>>
>> On Monday, February 17, 2014 2:27:12 AM UTC-8, Patrik Nordwall wrote:
>>>
>>> Hi,
>>>
>>> You can send an akka.actor.Identify("hello") and the actor will reply
>>> with akka.actor.ActorIdentity("hello", Some(actorRef)) message, if it
>>> exists.
>>> If it doesn't exist the reply will be akka.actor.ActorIdentity("hello",
>>> None), but this message (as all messages) can be lost and then you will not
>>> receive any reply, and then you can retry it.
>>>
>>> You need an actor to handle the reply, which you might not have in your
>>> Play application. Then you can use ask instead, and act on the
>>> Future[ActorIdentity].
>>>
>>> Cheers,
>>> Patrik
>>>
>>>
>>> On Sun, Feb 16, 2014 at 4:01 PM, Ömer Faruk Gül <[email protected]>wrote:
>>>
>>>> Hi,
>>>>
>>>> First of all I'm using akka 2.2 with play 2.2.1. So I don't have access
>>>> to method resolveOn.
>>>>
>>>> What's the proper way of checking if actor exists and create it if
>>>> doesn't exists?
>>>>
>>>> So I want to check if the following actorselection exists, what can I
>>>> do?
>>>>
>>>> Akka.system().actorSelection("room-"+room.id)
>>>>
>>>> Thanks.
>>>>
>>>> --
>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>> >>>>>>>>>> Search the archives: https://groups.google.com/
>>>> group/akka-user
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Akka User List" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Patrik Nordwall
>>> Typesafe <http://typesafe.com/> - Reactive apps on the JVM
>>> Twitter: @patriknw
>>>
>>> --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>>
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Heiko Seeberger
> Twitter: @hseeberger
> Blog: blog.heikoseeberger.name
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/qqzKfE3_VSw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.