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

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
主站蜘蛛池模板: 囊谦县| 西充县| 洪泽县| 高阳县| 玉树县| 广灵县| 民县| 武功县| 舒兰市| 湛江市| 永靖县| 昌图县| 光山县| 濮阳市| 新津县| 陆河县| 汝阳县| 来凤县| 临清市| 肥东县| 白山市| 阿荣旗| 双江| 青海省| 筠连县| 安岳县| 崇阳县| 五大连池市| 梧州市| 潜山县| 远安县| 英超| 确山县| 砀山县| 亚东县| 宝丰县| 巴彦淖尔市| 平潭县| 福海县| 崇仁县| 岐山县|