Method of constructing event bus RxBus based on RxJava
An event bus and event technology, applied in software engineering design, creation/generation of source code, instruments, etc., can solve problems such as difficult to test and track codes, confusion, etc., and achieve easy testing and tracking, simplified communication methods, and concise business codes Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0029] Such as figure 1 As shown, the method of building an event bus RxBus based on RxJava includes defining an event bus class, denoted as the RxBus class, in which the topic mapping object is defined, the instance method of generating the RxBus class, the registration method, the anti-registration method and the publishing event method;
[0030] The instance method for generating the RxBus class is used to generate an instance of the RxBus class in a singleton mode;
[0031] The subject mapping object is ConcurrentHashMap> type object, denoted as subjectMapper;
[0032] The registration method includes: using the class flag in the formal parameter of the registration method as a parameter to call the get method of subjectMapper to obtain the corresponding List type of array list; if the array list is empty, create the array list, and store the incoming class flag parameter and array list into subjectMapper; create a new PublishSubject object and convert it to a Se...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com