1 Preface
An object references another object of the same type to form a chain. Each object in the chain implements a face filter method to process the same request initiated to the first object in the chain. If the first object does not know how to process the request, it will send the request to the next responder.
2. Details
2.1 Brief Introduction
More than 10 objects have the opportunity to process requests, so as to avoid coupling between request senders and recipients. This mode links these objects to a chain and transmits requests along the chain until an object processes it.
2.2 When to use
(1) There are multiple objects that can process requests, and the processing program can only be determined at runtime.
(2) send a request to a group of objects without displaying the specific handler for the specified request.
3 conclusion
The above is all content and I hope it will help you.