users@jersey.java.net

Re: [Jersey] BaseParamInjectableProvider access to Providers

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 24 Aug 2010 12:09:57 +0200

Hi Stephen,

It should be possible to inject the type Providers or
MultivaluedParameterExtractorProvider as fields on your
InjectableProvider e.g.:

   @Context MultivaluedParameterExtractorProvider mpep;

then you can access then in the getInjectable method.

Fields are required because InjectableProvider components are slightly
special and are instantiated before other injectable stuff is
registered. Thus Jersey does a second pass with injection one all
provider-based components have been constructed.

Paul.



On Aug 23, 2010, at 6:01 PM, Stephen Colebourne wrote:

> Is there any way to access the Providers instance from
> InjectableProvider?
>
> I'm trying to write my own @XxxParam, but I need the Providers and
> can't find them...
>
> Stephen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>