Is JAX-RS Client Thread Safe

前端 未结 2 1915
粉色の甜心
粉色の甜心 2021-02-05 04:07

In Java EE7, the JAX-RS Client API provides a high-level API for accessing any REST resources. According to the documentation, \"Clients are heavy-weight objects that manage

2条回答
  •  无人共我
    2021-02-05 04:42

    The JavaDoc is mostly answering your question already- yes it's thread-safe and you can and should reuse it. There can be a performance issue from not reusing it, i.e. if you create a Client for every HTTP request you make your performance will suck really bad.

提交回复
热议问题