• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Design Patterns | Chain of Responsibility
  1. References
  2. Example
    • The Object
    • The Abstract Handler
    • The Concrete Handler (1)
    • The Concrete Handler (2)
    • A simple class to test the Chain of Responsibility design pattern

  1. References
    • Definition: (source: http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern)

      The Chain of Responsibility pattern is a 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.
  2. Example
    • The Object:


    • The Abstract Handler:


    • The Concrete Handler (1):


    • The Concrete Handler (2):


    • A simple class to test the Chain of Responsibility design pattern:


© 2025  mtitek