- Summary
- It allows an object to send a command without knowing what object will receive and handle it and if multiple handler then they will them self decide that which one will handle it.
- It is generally achieved by creating linked list of handlers and command request is sent from one object to another object across the chain until one of the objects will handle it.
- Overview
- http://www.oodesign.com/chain-of-responsibility-pattern.html
- Implementation
- Client holds an instance of absolute handler
(List Head)
- Each handler holds a reference to next handler
object.
- Concrete handlers (hold in absolute references)
will actually implement the behavior.
- Example
- Email Spam handlers
- Specific Consideration
- TODO
|
|