Open madhugarimilla opened 8 years ago
I have created a request filter by simply using the @Provider annotation and registering the component using DS.
@Provider
@Component(service = ContainerRequestFilter.class)
public class StorageResourceFilter implements ContainerRequestFilter {
@Override
public void filter(ContainerRequestContext requestContext) throws IOException {
...
}
}
Thanks Bryan. That worked. Can i provide multiple types to service attribute in the same class. something like
@Component(service = ContainerRequestFilter.class,ContainerResponseFilter.class)
OSGi allows you to register a component as multiple services. I don't know if the publisher will do anything with that.
I am trying to add some processing for all my requests and response of the Rest resources exposed inside my OSGI budle using the below classes
javax.ws.rs.container.ContainerRequestFilter, javax.ws.rs.container.ContainerResponseFilter
How do i hookup these filters iniside my Activator class? I was using the below method before i started using osgi-jax-rs-connector