RESTEasy当中ServletContainerDispatcher的分析

首先是ServletContainerDispatcher的类图:

ServletContainerDispatcher

ServletContainerDispatcher里面包含Dispatcher接口(它自己不实现Dispatcher接口)

ResteasyContext负责push和get环境相关的context数据

SynchronousDispatcher里面也封装着context(defaultContextObjects)

可以看一下pushContextObjects()方法:

HttpServletDispatcher包含ServletContainerDispatcher

ServletContainerDispatcher.init()

里面涉及到contextResteasyContext)的注入:

ServletContainerDispatcher.service()

里面同样涉及到context的注入和与Dispatcher的交互:

各个模块之间的关系

可以看到HttpServletDispatcherFilterDispatcher都包含ServletContainerDispatcher

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