From: Stefan Weber <stefan.we...@gmail.com>
Date: Thu, 12 Nov 2009 13:58:13 +0100
Local: Thurs, Nov 12 2009 7:58 am
Subject: Re: Threading Policies
On Thu, Nov 12, 2009 at 9:32 AM, Sergio Bossa <sergio.bo...@gmail.com>wrote:
I know, I know, that's why I was recently considering to add to
> Actorom a bunch of commonly used handler implementation, such as
Yes, I think this would be great. In case I'm really running into problems
> "BalancingActor", "OffloadingActor" and so on ... do you think it > could be a worthy addition? with the sequantial execution of handlers, I'll try to implement something in this direction and keep you updated of course. Another idea I had: for my use case it would be nice to have more
For example, it would be very useful to have something along these lines:
class MyHandler {
@OnMessage(type = Message.class)
@OnMessage(type = Message.class)
}
The current implementation of course does not know which handler to call
here, so I am using more specific types in the @OnMessage annotation. However, since I get a generic Message from the 3rd party app, I had to plug in a factory that creates a more specific Message from the generic Message before calling the send method on the actor (but in many cases, I don't need this more specific Message later on). so I would need to inject a CoreHandler when spawning the new actors (e.g.
Could I make myself clear? :) What do you think? Does this make sense?
Best,
Stefan
> > Actually, I had to ideas how to implement it:
> > [CUT] > > I prefer solution 2 because it is simpler. > Agree: and #2 actually does what you describe in #1 under the hood, so
> > The only small doubt I have is
> Absolutely agree: I don't think creating Runnable objects would be a
> Cheers,
> Sergio B.
> --
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||