What is Chain of Responsibility
####Purpose Gives more than one object an opportunity to handle a request by linking receiving objects together. ####UML ####Use When
- A set of objects should be able to handle a request with the handler determined at runtime.
- Multiple objects may handle a request and the handler doesn’t have to be a specific object
- A request not being handled is an acceptable potential outcome.
User Where
- JDK Exception Handle
- Java EE Servlet Fileter
本文介绍了责任链设计模式的目的及应用场景。此模式允许多个对象有机会处理请求,通过链接接收对象来实现请求处理者的选择在运行时确定。适用于一组对象能够处理请求但处理者不确定的情况,且未被处理的请求也是一个可接受的结果。

被折叠的 条评论
为什么被折叠?



