Chain Of Responsibility

本文介绍了责任链设计模式的目的及应用场景。此模式允许多个对象有机会处理请求,通过链接接收对象来实现请求处理者的选择在运行时确定。适用于一组对象能够处理请求但处理者不确定的情况,且未被处理的请求也是一个可接受的结果。

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

转载于:https://my.oschina.net/u/3212423/blog/821372

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值