I would like to add some listener actors to another actor (parent). I.e. when the parent actor receives a specific message, the listener actors should be notified. The list of listeners should be dynamically modifiable.I am wondering what's the best way to implement something like this. I have seen akka.routing.Listeners, akka.routing.Listen, etc in the reference, but the documentation is rather lacking. Any tips would be appreciated.
thanks,-g.--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/I3d-r07OunkJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
That's very interesting (I couldn't find a mention to this feature in
the documentation).
I have one question: what happens when a listening actor is stopped?
Or more precisely: does the Listeners take care of that automatically,
or do we still have to pay attention to it? The scaladoc [1] does not
say anything about it.
Cheers,
Alexandre.
[1] http://doc.akka.io/api/akka/2.0/#akka.routing.Listeners
On Sun, Apr 1, 2012 at 4:50 PM, Viktor Klang <viktor...@gmail.com> wrote:That's very interesting (I couldn't find a mention to this feature in
> Hi George,
>
> On Sun, Apr 1, 2012 at 3:06 PM, George Moschovitis
> <george.mo...@gmail.com> wrote:
>>
>> I would like to add some listener actors to another actor (parent). I.e.
>> when the parent actor receives a specific message, the listener actors
>> should be notified. The list of listeners should be dynamically modifiable.
>>
>> I am wondering what's the best way to implement something like this. I
>> have seen akka.routing.Listeners, akka.routing.Listen, etc in the reference,
>> but the documentation is rather lacking. Any tips would be appreciated.
>
>
>
>
> class MyActor extends Actor with Listeners {
> def receive = {
> case yourmessages => gossip("To All my listeners")
> } orElse listenerManagement
> }
>
>
> val myActor = context.actorOf(Props[MyActor])
>
> myActor ! Listen(someActorRef)
>
> myActor ! "pigdog"
the documentation).
I have one question: what happens when a listening actor is stopped?
Or more precisely: does the Listeners take care of that automatically,
or do we still have to pay attention to it? The scaladoc [1] does not
say anything about it.
Hi George,
... Happy hAkking!
Thank you,maybe a similar example should be included in the documentation.
-g.
On Sunday, April 1, 2012 11:50:36 PM UTC+3, √ wrote:Hi George,... Happy hAkking!
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/jxyLqK0MxnsJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
maybe a similar example should be included in the documentation.Similar in what way?
-g.
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/F_wx0GYGknEJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.