Difference between revisions of "Chain of Responsibility"
Line 1: | Line 1: | ||
− | The Chain of Responsibility pattern uses a chain of objects to handle a request, which is typically an event. Objects in the chain forward the request along the chain until one of the objects handles the event. Processing stops after an event is handled. | + | * The Chain of Responsibility pattern uses a chain of objects to handle a request, which is typically an event. Objects in the chain forward the request along the chain until one of the objects handles the event. Processing stops after an event is handled. |
[[Image:CoR1.jpg]] | [[Image:CoR1.jpg]] | ||
Line 5: | Line 5: | ||
== Purpose == | == Purpose == | ||
− | Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle | + | * Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle |
the request. Chain the receiving objects and pass the request along the chain until an object handles it. | the request. Chain the receiving objects and pass the request along the chain until an object handles it. | ||
Line 12: | Line 12: | ||
== UML Diagram == | == UML Diagram == | ||
[[Image:CoR_UML.jpg]] | [[Image:CoR_UML.jpg]] | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | == External Links == | ||
+ | *External Links | ||
+ | |||
+ | ---- | ||
+ | --[[User:Djeyarat|Djeyarat]] 15:49, 2 April 2007 (EDT) |
Revision as of 14:49, 2 April 2007
- The Chain of Responsibility pattern uses a chain of objects to handle a request, which is typically an event. Objects in the chain forward the request along the chain until one of the objects handles the event. Processing stops after an event is handled.
Purpose
- Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle
the request. Chain the receiving objects and pass the request along the chain until an object handles it.
UML Diagram
External Links
- External Links
--Djeyarat 15:49, 2 April 2007 (EDT)