The Chain of Responsibility pattern’s pitfalls and improvements - Java World - The classic Chain of Responsibility (CoR) pattern requires the individual chain node classes to decide whether the next node should be called to fulfill the chain’s responsibility. This is a design flaw because, in practice, such a call can be easily forgotten. In this article, CoR implementations of Microsoft Windows global hook and Java servlet filter framework are used as examples to demonstrate that flaw. A solution is proposed, and an action chain that allows multiple actions to handle an HTTP request in the Struts framework is discussed. The Chain of Responsibility pattern’s pitfalls and improvements - Java World
The GOF “Chain of Responsibility” Design Pattern - The Chain of Responsibility pattern is used to pass responsibility for handling a call to another class. This article gives a basic overview of the pattern. The GOF “Chain of Responsibility” Design Pattern