Open IRus opened 7 years ago
We're pretty deeply integrated with JAX-RS. From the top of my head we're using (in the order of increasing API/code dependency):
javax.ws.rs.core.Configuration
for storing LR service instance, which is then used to provide a convenient static factory for LinkRest opsjavax.ws.rs.core.Feature
to contribute extensionsjavax.ws.rs.core.UriInfo
for access to request details (i.e. implementation of LR protocol)We also heavily depend on Jersey and JAX-RS annotations in tests.
I'd say the most rational way to use LinkRest with anything other than JAX-RS would be to create a bridge library (rather than attempting to "generify" the LinkRest itself), possibly with a limited number of features. This library will provide a decorating layer of LinkRest interfaces, that will be responsible for translating the particular REST/HTTP framework artifacts to JAX-RS artifacts. The library will also be required to provide alternatives for JAX-RS services that happen outside of the "resource" method body (i.e. request payload pre-processing and response/exception encoding).
Actually our dependency on JAX-RS is thinner than it appears. A number of planned improvements ( monadic processor specifically) would move us to an LR core that is agnostic of specific request/response interface. So while I don't expect this to happen overnight, JAX-RS independence may evolve as a side effect of the other changes.
As I see, currently LinkRest coupled with jax-rs (javax.ws.rs.core.Configuration). Would be great to provide common implementation, which can be used with spring-webmvc or bootique-undertow for example.
I think we should provide our interface, which I can implement to support other servers.