Plug-in support method based on preloading mechanism

A preloading and plug-in technology, applied in the field of communication, can solve the problems of migration and transformation obstacles, the inability to call the main program arbitrarily, and the exposure of script source code, so as to speed up the running speed of plug-ins and reduce the time for type search and reading.

Active Publication Date: 2015-06-03
北京神舟航天软件技术股份有限公司
View PDF9 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0009] Among the above two methods, although the first method is simple to implement, because the script is interpreted and executed, the operating efficiency is poor, and the source code of the script is exposed to the outside world, so it is only suitable for some simple function extensions
Although the second method has high operating efficiency, it can only realiz...

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
  • Plug-in support method based on preloading mechanism
  • Plug-in support method based on preloading mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] Specific embodiments of the present invention will be described in detail below.

[0028] like figure 2 As shown, the plug-in support method based on the preloading mechanism includes the following steps:

[0029] (1), the main program starts and loads the plug-in running framework at the same time, and the plug-in running framework is responsible for reading all external plug-ins;

[0030] (2), the plug-in running framework starts an independent class loader for each external plug-in, each class loader loads the types in the plug-in, and saves the type obtained after loading into the global cache;

[0031] (3) The plug-in running framework obtains the current class loader of the main program, modifies the parent loader of the current loader of the main program through reflection, and replaces the parent loader of the current class loader of the main program with the proxy class of the original parent loader , the proxy class of the original parent loader will interc...

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 relates to a plug-in support method based on a preloading mechanism. The method comprises the following steps that 1, a main program starts, in addition, a plug-in operation framework is loaded, and the plug-in operation framework is in charge of reading an external plug-in; 2, the plug-in operation framework starts an independent class loader for the external plug-in, the class loader loads the types in the plug-in, and in addition, the types are stored in the local global buffer; 3, the plug-in operation framework obtains the current class loader of the main program, a parent loader of the current class loader of the main program is replaced into the agent class of the original parent loader, and the agent class of the original parent loader can intercept all classes sent to the original class loader for loading and calling; 4, when the main program requests to call the Class type, the Class type is found in the original parent loader according to the type names, if the target type is not found, whether the types provided by the corresponding plug-in exists or not is matched in the local global buffer, if the matching is successful, the direct loading and executing is carried out, and otherwise, exception is thrown.

Description

technical field [0001] The invention belongs to the communication field, and in particular relates to a plug-in support method based on a preloading mechanism. Background technique [0002] Modern software applications are generally developed based on object-oriented thinking. In order to execute program codes, corresponding classes or interfaces need to be loaded. The so-called loading is the process of finding the binary form of a class or an interface and using the binary form to construct a class object representing this class or this interface. [0003] Generally speaking, after the program is developed, the object type contained in the compiled result is determined, that is, its application logic is determined. If it is desired to enhance software functions without modifying the main body of the software program, the system needs to have the ability to dynamically load external object types at runtime. [0004] In order to solve the above problems, it is necessary to...

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
IPC IPC(8): G06F9/445
Inventor 倪永全单承方耿建光温小龙
Owner 北京神舟航天软件技术股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products