Use the Chain of Responsibility pattern when…

  • You have:
    • More than one handler for a request
    • Reasons why a handler should pass a request on to another one in the chain
    • A set of handlers that varies dynamically
  • You want to:
    • Retain flexibility in assigning requests to handlers