Design Pattern (Part 05) — Chain Of Responsibility Pattern

Photo by Google

When to use Chain of Responsibility Design Pattern

  1. when decoupling a request’s sender and receiver.
  2. Multiple objects, determined at runtime, are candidates to handle a request.
  3. when don’t want to specify handlers explicitly in code.
  4. When more than one object can handle a request and the handler is unknown.
Class Diagram



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arun prashanth

Arun prashanth

Software Engineer at Virtusa (Pvt) Ltd.