IOS design model learning (17) responsibility chain

Source: Internet
Author: User

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.