> Design Patterns > Chain of Responsibility Design Pattern
Chain of responsibility design pattern is used to provide a chain of objects to handle the request.
The intent of chain of responsibility design pattern is to chain the receiving objects to handle the request one by one till it gets handled.
There may be a situation where the sender does not know which specific object has to handle its request.
So we can have multiple objects in chain and handle the request one by one till the request is handled.
Here is the chain of responsibility design pattern example.
Network Management Explorer has Networks, node like system, database, printer etc. Some command like Configure should be executed based on what is selected.
C++ | Chain of Responsibility Pattern in C++ | Chain of Responsibility Pattern C++ Example |
C# | Chain of Responsibility Pattern in C# | Chain of Responsibility Pattern C# Example |
Java | Chain of Responsibility Pattern in Java | Chain of Responsibility Pattern Java Example |
Python | Chain of Responsibility Pattern in Python | Chain of Responsibility Pattern Python Example |
JavaScript | Chain of Responsibility Pattern in JavaScript | Chain of Responsibility Pattern JavaScript Example |
PHP | Chain of Responsibility Pattern in PHP | Chain of Responsibility Pattern PHP Example |
Ruby | Chain of Responsibility Pattern in Ruby | Chain of Responsibility Pattern Ruby Example |
Swift | Chain of Responsibility Pattern in Swift | Chain of Responsibility Pattern Swift Example |
Objective-C | Chain of Responsibility Pattern in Objective-C | Chain of Responsibility Pattern Objective-C Example |