What is MessageBodyReader?
public interface MessageBodyReader Contract for a provider that supports the conversion of a stream to a Java type. A MessageBodyReader implementation may be annotated with Consumes to restrict the media types for which it will be considered suitable.
What is @provider annotation in Java?
The @Provider annotation is used for anything that is of interest to the JAX-RS runtime, such as MessageBodyReader and MessageBodyWriter. For HTTP requests, the MessageBodyReader is used to map an HTTP request entity body to method parameters.

Which of these are implementations of JAX-RS API?
JAX-RS is a standard defined in Java Specification Request 311 (JSR-311) and Jersey / RESTEasy are implementations of it.
Which of these are important annotations in used in JAX-RS API?
JAX-RS API provides following annotations to develop RESTful applications in java….JAX-RS Annotations.
Annotation | Description |
---|---|
POST | specifies method responds to POST request. |
PUT | specifies method responds to PUT request. |
HEAD | specifies method responds to HEAD request. |
DELETE | specifies method responds to DELETE request. |
What is the difference between @produces and @consumes?

@Consumes specifies what MIME type a resource accepts from the client. @Produces , however, specifies what MIME type a resources gives to the client. For example, a resource might accept application/json ( @Consumes ) and return text/plain ( @Produces ).
What is ContainerResponseFilter?
public interface ContainerResponseFilter. An extension interface implemented by container response filters. By default, i.e. if no name binding is applied to the filter implementation class, the filter instance is applied globally to any outgoing response.
What is javax inject provider?
javax.inject Provides instances of T . Typically implemented by an injector. For any type T that can be injected, you can also inject Provider . Compared to injecting T directly, injecting Provider enables: retrieving multiple instances.
What is a provider in Java?
A Provider is a package or set of packages that supplies a concrete implementation of a subset of the Java™ 2 SDK Security API cryptography features. The Provider class is the interface to such a package or set of packages. It has methods for accessing the provider name, version number, and other information.
What is JAX-RS application?
JAX-RS is a Java programming language API designed to make it easy to develop applications that use the REST architecture. The JAX-RS API uses Java programming language annotations to simplify the development of RESTful web services.
Which JAX-RS annotation is used to get status of method availability?
Specifications
Sr.No. | Annotation & Description |
---|---|
3 | @PUT HTTP PUT request, used to update resource. |
4 | @POST HTTP POST request, used to create a new resource. |
5 | @DELETE HTTP DELETE request, used to delete resource. |
6 | @HEAD HTTP HEAD request, used to get status of method availability. |