You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Dan Diephouse <da...@mulesource.com> on 2008/01/09 00:41:33 UTC

Making a Provider a Resolver

I was wondering: does anyone see a clean way to auto-detect that a 
Provider also implements Resolver and use it automatically instead of 
having the user specify both?

- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Re: Making a Provider a Resolver

Posted by Dan Diephouse <da...@mulesource.com>.
Jim Ancona wrote:
> Dan Diephouse wrote:
>> I was wondering: does anyone see a clean way to auto-detect that a 
>> Provider also implements Resolver and use it automatically instead of 
>> having the user specify both?
>
> How about if ServiceProvider implemented ItemManager<Provider> in 
> addition to Provider (i.e. acted as its own Manager)? The 
> ServiceContext could then use reflection to detect that one object 
> implements both Resolver<Target> and ItemManager<Provider> and use it 
> for both purposes.
>
> Jim
This could work. I'll give this a whirl next week I think. Thanks!

- Dan

-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog


Re: Making a Provider a Resolver

Posted by Jim Ancona <ji...@anconafamily.com>.
Dan Diephouse wrote:
> I was wondering: does anyone see a clean way to auto-detect that a 
> Provider also implements Resolver and use it automatically instead of 
> having the user specify both?

How about if ServiceProvider implemented ItemManager<Provider> in 
addition to Provider (i.e. acted as its own Manager)? The ServiceContext 
could then use reflection to detect that one object implements both 
Resolver<Target> and ItemManager<Provider> and use it for both purposes.

Jim