When you start publishing services, you typically come across scenarios which require some additional layers of processing. You might need some special processing for mapping representations of entities and their Java types. Such cases are handled by supplying an entity provider to the JAXRS runtime. A provider class would implement JAXRS-specific interfaces and additionally use the @Provider annotation, which is used at runtime for auto-discovery of all providers. Apart from entity providers, there's context providers and exception mapping providers.
Providers
Entity providers
Entity providers can be used to do the marshaling and un-marshaling of Java objects to and from another representation. There are two options...