Unlock instant, AI-driven research and patent intelligence for your innovation.

Implementation method, storage medium, electronic device and system of aop agent framework

An implementation method and system implementation technology, applied in software design, code compilation, program code conversion, etc., can solve problems such as poor flexibility and complicated operation process, and achieve the effect of improving flexibility and simplifying operation process

Active Publication Date: 2021-02-02
WUHAN DOUYU NETWORK TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] AspectJ uses compile-time enhancement to generate AOP proxy classes for business applications. Since AOP proxy classes are generated at compile time, if you need to modify the interception function of AOP proxy classes, you must recompile the business classes to apply the new AOP proxy classes. ; The operation process of recompiling business classes is more complicated and less flexible
[0007] Spring AOP uses runtime enhancement to generate AOP proxy classes for business applications, that is, the logic of AOP proxy classes generated by Spring AOP and business logic are located in the same application, so if you need to modify the interception function of AOP proxy classes, you need to recompile Business class, that is, the operation process is also more complicated and less flexible

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Implementation method, storage medium, electronic device and system of aop agent framework
  • Implementation method, storage medium, electronic device and system of aop agent framework

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0034] see figure 1 As shown, the implementation method of the AOP proxy framework in the embodiment of the present invention comprises the following steps:

[0035] S1: In the AOP proxy framework (SkyEye AOP), register the business class and go to S2.

[0036] S2: When the AOP proxy framework detects that the JVM (Java Virtual Machine, Java virtual machine) loads the business class registered in S1, it turns to S3.

[0037] S3: Traverse each constructor and business method of the business class (static method and dynamic method of the business class), define the traversed constructor or business method as an item to be intercepted, and each item to be intercepted includes at least 2 businesses item, go to S4.

[0038] S4: In all interceptors of the AOP proxy framework (interceptors are configured and loaded after all business classes regis...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an implementation method, a storage medium, electronic equipment and a system of an AOP proxy framework, and relates to the field of AOP proxy. The steps of this method are: in the AOP proxy framework, register the business class, and when the AOP proxy framework detects that the registered business class is loaded, traverse each constructor and business method of the business class, and traverse the constructor or business The method is defined as an item to be intercepted; among all interceptors in the AOP proxy framework, all interceptors corresponding to the business items of the current item to be intercepted form an interception chain of the current item to be intercepted; according to the interception chain of the current item to be intercepted, Intercept the business items of the current project to be intercepted. When modifying the intercepting function of the interceptor, the present invention does not need to recompile the business class, thereby significantly simplifying the operation process of AOP intercepting the business class, and greatly improving the flexibility of the AOP.

Description

technical field [0001] The invention relates to the field of AOP proxy, in particular to a method for realizing an AOP proxy framework, a storage medium, electronic equipment and a system. Background technique [0002] AOP (Aspect Orient Programming, Aspect-Oriented Programming) is a supplement to object-oriented programming and is widely used to handle some system-level services with cross-cutting properties, such as transaction management, security checks, caching, and object pool management. AOP can be used to intercept various business items of business classes (business classes include constructors and business methods, and business methods include static methods and dynamic methods), so that the coupling degree between the various parts of the business class is reduced, and the reliability of the program is improved. Reusability, while improving the efficiency of development. The key to AOP implementation lies in the AOP proxy class (i.e. interceptor) automatically cr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/20G06F8/41
CPCG06F8/24G06F8/41
Inventor 支猛陈少杰张文明
Owner WUHAN DOUYU NETWORK TECH CO LTD