Changes

Jax-rs 2.0

19 bytes removed, 17:43, 16 February 2019
Jax-RS provider típusok
A JAX-RS-ben 3 típusa létezik a provider-ekenek, melyekkel három különféle feladatot láthatunk el:
====* Entity provider====
https://docs.huihoo.com/jersey/2.13/message-body-workers.html<br>
The Entity provider API contains 2 interfaces. One for handling inbound entity representation-to-Java de-serialization - '''MessageBodyReader<T>''' and the other one for handling the outbound entity Java-to-representation serialization - '''MessageBodyWriter<T>'''. A MessageBodyReader<T>, as the name suggests, is an extension that supports reading the message body representation from an input stream and converting the data into an instance of a specific Java type. A MessageBodyWriter<T> is then responsible for converting a message payload from an instance of a specific Java type into a specific representation format that is sent over the wire to the other party as part of an HTTP message exchange. Both of these providers can be used to provide message payload serialization and de-serialization support on the server as well as the client side.
 ====* Context provider====
https://www.logicbig.com/tutorials/java-ee-tutorial/jax-rs/context-resolver.html<br>
Context providers supply a context object to resource classes or to other providers.A context provider class must implement the ContextResolver<T>interface.
 ====* Exception provider====
These providers map a checked or runtime exception to an instance of Response. They implement ExceptionMapper<T>. Számunkra ez a lényeges. Itt fogjuk az exception-t
<br><br>
 
===Megvalósítás===