Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Threading Policies
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sergio Bossa  
View profile  
 More options Nov 12 2009, 8:56 am
From: Sergio Bossa <sergio.bo...@gmail.com>
Date: Thu, 12 Nov 2009 14:56:46 +0100
Local: Thurs, Nov 12 2009 8:56 am
Subject: Re: Threading Policies

On Thu, Nov 12, 2009 at 1:58 PM, Stefan Weber <stefan.we...@gmail.com> wrote:
> Yes, I think this would be great. In case I'm really running into problems
> with the sequantial execution of handlers, I'll try to implement something
> in this direction and keep you updated of course.

Great, thanks for the feedback.

> Another idea I had: for my use case it would be nice to have more
> flexibility regarding the selection of the handler method on the actor.
> Currently, there is always the CoreHandler used internally but it would be
> nice to plug in custom logic there.
> [CUT]
> 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.
> something called MyCoreHandler that extends CoreHandler and overrides
> handleOnMessage). I could then analyze the method name with reflection,
> compare it with the message type of the currently processed message and then
> dispatch based on this.

I've lost you there: even if you get a generic Message instance,
CoreHandler works by reflection and you don't need to do any wrapping.
In other words, if you get a generic Message whose actual type is
BarMessage, and you annotate your handler object with
@OnMessage(type=BarMessage.class), CoreHandler will call the correct
method.

Does it make sense for your use case, or am I getting it wrong?

--
Sergio Bossa
Software Passionate and Open Source Enthusiast.
URL: http://www.linkedin.com/in/sergiob


 
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.