RESTEasy | ClientInvocation和ClientResponse的life scope分析

Invocation,response,engine的关系如下:

经过分析,可以看到ClientInvocation会去生成ClientResponse

ClientResponse response = (aborted != null) ? aborted : client.httpEngine().invoke(this);

可以看倒把invocation自己具体的实现传入了http engine。

HTTP engine的具体实现有多个classes,以下是ApacheHttpClient4Engine的实现:

因此,可以看到ClientResponse是和Invocation的life scope一致的。

My Github Page: https://github.com/liweinan

Powered by Jekyll and Theme by solid

If you have any question want to ask or find bugs regarding with my blog posts, please report it here:
https://github.com/liweinan/liweinan.github.io/issues