Chain of responsibility design pattern is one of the behavioral design pattern which is used to achieve lose coupling in software application design where a request form client is passed to a chain of object to process them. The object in the chain will decide themselves who will be processing the request and whether the request is needed to be sent to the next object in the chain or not.
Highlight of Chain of Responsibility
- The requester will not know which object in the chain will serve its request
- Every object in the chain have the responsibility to decide, if they can serve the request
- Every object have capable to choosing the next object in the chain and forward the request
Exception Handling mechanism, ATM money dispenser, Logger, Interceptors