O'Reilly logo

Design Patterns in Java™, Second Edition by William C. Wake, Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12 Chain of Responsibility

OBJECT-ORIENTED DEVELOPERS strive to keep objects loosely coupled, keeping the responsibility between objects specific and minimal. This lets you introduce change more easily and with less risk of introducing defects. Decoupling occurs naturally in Java, to a degree. Clients see only an object’s visible interface and remain isolated from the details of the object’s implementation. This arrangement, however, leaves in place the fundamental coupling that the client knows which object has the method the client needs to call. You can loosen the restriction that a client must know which object to use when you can arrange a group objects in a kind of hierarchy that allows each object to either perform an operation or pass ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required