users@jersey.java.net

Re: [Jersey] Injection into HeaderDelegateProvider

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 09 Apr 2009 17:54:28 +0200

Hi Tim,

Unfortunately this is not currently possible.

The HeaderDelegateProvider instances do not behave like other provider
components.

The reason is because the JAX-RS HeaderDelegate class is exposed via
the RuntimeDelegate which gets instantiated without any contextual
information. And, the header delegate instances are used by some of
the classes in JAX-RS e.g. MediaType as static fields.

I think there are ways we can support what you require, but it will
require a little work. Could you log an issue?

Thanks,
Paul.

On Apr 9, 2009, at 5:24 PM, Tim Edwards wrote:

>
> Hi,
>
> Is it possible to inject values into a HeaderDelegateProvider?
> Basically I have a HeaderDelegateProvider I wish to provide some
> configuration so it is capable of reading/writing the header value,
> I can't have the information statically within the class and I don't
> see an obvious way to make it available.
>
> Thanks,
> Tim
>
>
>
> If you are not the intended recipient, employee or agent responsible
> for delivering the message to the intended recipient, you are hereby
> notified that any dissemination or copying of this communication and
> its attachments is strictly prohibited. If you have received this
> communication and its attachments in error, please return the
> original message and attachments to the sender using the reply
> facility on e-mail. Internet communications are not secure and
> therefore Cambridge Assessment (the brand name for the University of
> Cambridge Local Examinations Syndicate, the constituent elements of
> which are CIE, ESOL and OCR [Oxford Cambridge and RSA Examinations
> is a Company Limited by Guarantee Registered in England. Registered
> office: 1 Hills Road, Cambridge CB1 2EU. Company number: 3484466])
> does not accept legal responsibility for the contents of this
> message. Any views or opinions presented are solely those of the
> author and do not necessarily represent those of Cambridge
> Assessment unless otherwise specifically stated. The information
> contained in this email may be subject to public disclosure under
> the Freedom of Information Act 2000. Unless the information is
> legally exempt from disclosure, the confidentiality of this email
> and your reply cannot be guaranteed.
>
> This message has been scanned for viruses by BlackSpider MailControl
>