官术网_书友最值得收藏!

JAX-RS – the servlet router

Even if JAX-RS is not fully bound to HTTP and is usable over JMS, WebSockets, and so on, we will just consider the HTTP case here and, more particularly, the case it runs on top of the servlet specification (which is the most common one).

The goal of JAX-RS is to provide a command pattern based on the API to implement the HTTP communications. In other words, it abstracts the I/O with Java modeling. You can see it as a HTTP Java object binding solution. This is what QuoteResource uses.

The role of JAX-RS is to provide all the necessary tooling to make servlet abstraction directly usable for most cases. For this purpose, it provides the following:

  • A routing layer letting developers directly map the request based on its path
  • A serialization layer allowing the conversion of Java objects into HTTP models and streams
  • An exception handling layer enabling the mapping of an exception to an HTTP response
主站蜘蛛池模板: 南和县| 闽清县| 车致| 明光市| 开原市| 叶城县| 电白县| 三河市| 会理县| 睢宁县| 尚志市| 陕西省| 开封县| 宜良县| 枞阳县| 潞西市| 桦甸市| 壤塘县| 临漳县| 连江县| 齐河县| 布拖县| 喀喇| 昌邑市| 泾川县| 石河子市| 东丰县| 法库县| 卢湾区| 铅山县| 郯城县| 松溪县| 永康市| 苍南县| 昆山市| 五峰| 屏山县| 南岸区| 县级市| 平南县| 邵阳县|