abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Moseley" <...@osafoundation.org>
Subject Re: supporting multiple Providers
Date Tue, 12 Jun 2007 20:54:19 GMT
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