design-patternschain-of-responsibility

The Chain of Responsibility Pattern


Could somebody provide a simple explanation of the chain of responsibility pattern? I found the wiki article a bit confusing.


Solution

  • A very good example are java servlet filters - pieces of code that are executed before the HTTP request arrives at its target.

    So, with servlet filters, you can have