1. 程式人生 > >設計模式-十六篇責任鏈模式

設計模式-十六篇責任鏈模式

1. 定義

      責任鏈模式的定義:Avoid  couping the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receivinig objects and pass the request along the chain unit an object handle it.(使多個物件都有機會處理請求,從而避免了請求的傳送者和接收者之間的耦合關係,將這些物件連成一條鏈,並沿著這條鏈傳遞該請求,直到有物件處理他為止)

2. 通用類圖