Chain of Responsibility

noun

say it: “CHAYN uv rih-SPON-suh-BIL-ih-tee” /tʃeɪn əv rɪˌspɑnsəˈbɪlɪti/

A design pattern that passes a request along a line of handlers, each of which handles or stops it, or passes it on to the next.

What is the Chain of Responsibility pattern?

Chain of Responsibility passes a request along a line of handlers. Each one either handles it (or stops it, with a reason) or passes it on to the next; the last one does the work. A voice command passes a night-time check, a someone's-home check and a permission check, and a new check is one more link in the line.

In a sentence

  • “Vacation mode was one more link in the chain of responsibility, and no other check changed.”

Level: Journeyman · More OOP terms at this level

Updated