Juneau JAX-RS Provider

The Juneau framework contains the juneau-rest-server-jaxrs bundle for performing simple integration of Juneau serializers and parsers in JAX-RS compliant environments.

It should be noted that although some of the functionality of the Juneau Server API is provided through the JAX-RS integration components, it is not nearly as flexible as using the {@link oajr.RestServlet} class directly.

What you can do with the Juneau JAX-RS provider classes:

- Use existing Juneau serializers and parsers for converting streams to POJOs and vis-versa.
- Use annotations to specify filters and properties using the {@link oajr.annotation.RestMethod @RestMethod} and {@link oajr.jaxrs.JuneauProvider} annotations.

What you can't do with the Juneau JAX-RS provider classes:

- Specify or override serializers/parsers at the Java class and method levels.
  JAX-RS does not provide the capability to use different providers for the same media types at the class or method levels.
- Specify or override filters and properties at the Java class level.
- Default stylesheets for the {@link oaj.html.HtmlDocSerializer} class.
  It will produce HTML, but it won't contain any styles applied.
- The ability to specify HTTP method, headers, and content using GET parameters.
  These make debugging REST interfaces using only a browser possible.
- Class or method level encoding.
- Class or method level guards.
- Class or method level converters.

The Juneau JAX-RS provider API consists of the following classes:

- {@link oajr.jaxrs.BaseProvider} - The base provider class that implements the JAX-RS `MessageBodyReader` and `MessageBodyWriter` interfaces.
- {@link oajr.jaxrs.JuneauProvider} - Annotation that is applied to subclasses of `BaseProvider` to specify the serializers/parsers associated with a provider, and optionally filters and properties to apply to those serializers and parsers.
- {@link oajr.jaxrs.BasicProvider} - A default provider that provides the same level of media type support as the {@link oajr.BasicRestServlet} class.

For the most part, when using these components, you'll either use the existing BasicProvider, or define your own by subclassing BaseProvider.