Jetty: How to nest HandlerWrapper, HandlerList, and ContextHandlerCollection, and ContextHandler

戏子无情 提交于 2019-12-01 13:56:54

Handler - the base form of handling a request, its not a terminal point for the request processing unless you call request.setHandled(true)

HandlerWrapper - a handler that can perform some processing and decide if it should hand off the request to a nested (wrapped) handler.

HandlerCollection - a collection of handlers, following the standard java collection rules regarding execution order. Each handler in the collection is executed until one of them calls request.setHandled(true)

HandlerList - a specialized HandlerCollection that follows java.util.List ordering of execution of child Handlers

ContextHandler - a specialized HandlerWrapper that only executes its wrapped Handler if the request context-path and virtual hosts matches.

ContextHandlerCollection - a HashMap of ContextHandler that will only execute those child handlers (in the collection) that has a match to the request context-path (and virtual hosts)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!