hstaudacher / osgi-jax-rs-connector

An OSGi - JAX-RS 2.0 Connector, software repository available on the link below
http://hstaudacher.github.io/osgi-jax-rs-connector
Other
191 stars 98 forks source link

Tracking jax-rs Provider classes #3

Closed dilec closed 11 years ago

dilec commented 12 years ago

Hi, I thought it's useful to also track jax-rs "Provider" annotated classes, next to "Path" annotated classes. This allows to expose Providers like Restful Writers and Readers exposed as declarative services to be picked up.

Does this make sense ? Cheers, Dirk

hstaudacher commented 12 years ago

Hi Dirk, thanks for your contribution. I'm not very familiar with the @Provider Annotation but I think I understand the essentials. I have viewed your changes and noticed that only one line has changed. The one that does check if the @Path Annotation is present. This assumes that the @Provider handling is exactly the same as handling @Path Resources, is that right?

Can you provide some unit tests for this? It would be also cool if you could extend the examples to use this feature ;)

Thanks in advance.

Cheers Holger

dilec commented 12 years ago

Hi Holger, Just added an example; still need to check the unit test. I'm not familiar with the mockito lib used. Cheers, Dirk

hstaudacher commented 11 years ago

I have added some tests and did a little refactoring of the example. But basically everything is now merged. I will release Version 2.1 today which includes this feature. Thanks again for your work!