abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: supporting multiple Providers
Date Tue, 12 Jun 2007 23:48:34 GMT
Definitely interesting.  will take a look in greater detail this evening
but I think you're on the right track here.  Given that the request
context can be easily ignored, I do not think there would be any need
for the no-arg version of getProvider

- James

Brian Moseley wrote:
> On 6/12/07, Brian Moseley <bcm@osafoundation.org> wrote:
>> my server exposes several different types of resources, and i've found
>> it convenient to write a separate provider for each resource type.
>> however, AbstractRequestHandler and ProviderManager don't have any
>> extension points or other ability to make choices about which Provider
>> instance to use to handle a particular request.
>>
>> i'm imagining a provider manager that chooses a provider instance
>> based on matching a URI pattern or a target's class. this would
>> require ProviderManager.getProvider having access to the request
>> context. does this seem reasonable?
> 
> here's a first pass at a patch:
> <http://bcm.osafoundation.org/~bcm/abdera-providermanager.diff>
> 
> i didn't remove ProviderManager.getProvider() because it's not clear
> to me if anybody needs the no-parameter variant or not. i can update
> the patch if folks agree that the original variant is not necessary.
> 

Mime
View raw message