Описание тега chain-of-responsibility
Design pattern consisting of a source of command objects and a series of processing objects. One of the Gang of Four's behavioral design patterns.
Design pattern consisting of a source of command objects and a series of processing objects. Each processing object contains logic that defines the types of command objects that it can handle; the rest are passed to the next processing object in the chain. A mechanism also exists for adding new processing objects to the end of this chain.
This is one of the Gang of Four's behavioral design-patterns, first published in Gamma et al.'s book "Design Patterns: Elements of Reusable Object-Oriented Software".