Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jaxrs-dev] Another request for extension

I've created https://github.com/eclipse-ee4j/jaxrs-api/issues/707, with a rather artificial example of an application specific header.

Particularly relevant is the treatment of the HeaderDelegate as a provider. Although it doesn't show up in this example, it's especially convenient to be able to include a HeaderDelegate in a META-INF/services/javax.ws.rs.ext.Providers file.

On 11/28/18 9:42 AM, Santiago Pericas-Geertsen wrote:
Ron,

  It’s a good observation. I suppose application extensibility was not deemed as important at the time.

  Perhaps you can create an issue with some examples to help the discussion.

— Santiago

On Nov 27, 2018, at 7:43 PM, Ron Sigal <rsigal@xxxxxxxxxx> wrote:

Nothing in the JAX-RS 2.1 spec says that javax.ws.rs.ext.RuntimeDelegate$HeaderDelegate is a provider, which means that there is no reason to expect that something like javax.ws.rs.core.Configurable.register(Class<?>) will work for a HeaderDelegate. Moreover, there is no compulsion to recognize a declaration of a HeaderDelegate in a META-INF/services/javax.ws.rs.ext.Providers file, or a definition of a HeaderDelegate annotated with @Provider.

It's much easier to register a HeaderDelegate if it is recognized as a provider. Moreover, Just as one might want to use an application specific MessageBodyReader, one might want to use an application specific header, so it makes sense to think of a HeaderDelegate as a provider.

-Ron

--
My company's smarter than your company (unless you work for Red Hat)

_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jaxrs-dev
_______________________________________________
jaxrs-dev mailing list
jaxrs-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jaxrs-dev

--
My company's smarter than your company (unless you work for Red Hat)



Back to the top