CN104932928A - Plug-in development method and system based on java - Google Patents
Plug-in development method and system based on java Download PDFInfo
- Publication number
- CN104932928A CN104932928A CN201410099112.7A CN201410099112A CN104932928A CN 104932928 A CN104932928 A CN 104932928A CN 201410099112 A CN201410099112 A CN 201410099112A CN 104932928 A CN104932928 A CN 104932928A
- Authority
- CN
- China
- Prior art keywords
- plug
- unit
- main frame
- information table
- interface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention provides a plug-in development method based on java. The plug-in development method comprises following steps that A. an interface and a program structure of a main frame and a plug-in are defined; B. the main frame and the plug-in are respectively made according to the interface and the program structure; C. a plug-in class information table is defined, and the plug-in entry class file address of the plug-in is stored in the plug-in class information table; D. the plug-in is compiled as a jar package and is arranged in a plug-in directory of the main frame; E. and the main frame loads on and executes the plug-in according to the plug-in class information table. According to the invention, the interface and the program structure of the main frame and the plug-in are defined first, then the main frame and the plug-in are respectively made according to the interface and the program structure, and therefore the main frame and each plug-in have an unified interface, time spent on developing multiple kinds of plug-in interfaces or main frame interfaces can be shortened, and therefore the developing time of a plug-in software system can be shortened. The invention also provides a plug-in development system based on java.
Description
Technical field
The present invention relates to the plug-in unit of network technology, particularly relate to a kind of plug-in unit based on java and melt forwarding method and system.
Background technology
When program is run, allow reprogramming structure or types of variables, this language is called dynamic language, and viewed from this viewpoint, java is not dynamic language.But java has a very outstanding dynamical correlation mechanism: java reflex mechanism.Java program is always compiled into several independent class files, as required by the corresponding class of java virtual machine dynamic load when program performs.The class that operationally can load according to java reflex mechanism, find out, use compile duration completely unknown.In other words, just learn the class of title when java program can load an operation, learn its complete construction.
The plug-in unit software systems that plug-in unit melts can make all subservices all may operate in same system, and when some subservices change, only need to upgrade/develop a certain plug-in unit, and without the need to repeatedly revising main frame, also the normal operation of other subservice be can not have influence on, exploitation, the cost of test and the risk of upgrading greatly reduced like this.Plug-in unit software systems generally can be divided into main frame and plug-in unit two parts, and main frame interface and card i/f need adaptation, when card i/f or main frame interface type too much time can cause the main frame interface or the card i/f that need again to develop its adaptation, thus cause plug-in unit software system development overlong time.
Summary of the invention
An object of the present invention is to provide a kind of plug-in unit development technique that can shorten the plug-in unit software system development time.
Especially, the invention provides a kind of plug-in unit based on java and melt forwarding method, comprise the steps:
A, the interface of definition main frame and plug-in unit and program structure;
B, makes main frame and plug-in unit respectively by described interface and program structure;
C, definition plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table;
D, is compiled as jar bag, is placed on the plug-in unit catalogue of described main frame by described plug-in unit;
E, described main frame is loaded into according to described plug-in unit category information table and performs described plug-in unit.
Further, the quantity of described plug-in unit is one or more.
Further, described plug-in unit comprises bibliographic structure plug-in unit and the interface notification information insert of FTP.
Further, described step e comprises:
Described main frame is loaded into described plug-in unit category information table;
Described main frame performs general service function;
Described main frame performs described plug-in unit.
Further, the mode that described main frame is loaded into unknown class by reflex mechanism is loaded into described plug-in unit category information table.
The present invention also provides a kind of plug-in unit development system based on java, comprising:
Build module one, described structure module one defines interface and the program structure of main frame and plug-in unit;
Make module, described making module makes main frame and plug-in unit respectively by described interface and program structure;
Build module two, described structure module two defines plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table;
Collector, is compiled as jar bag, is placed on the plug-in unit catalogue of described main frame by described plug-in unit;
Execution module, described execution module makes described main frame be loaded into according to described plug-in unit category information table and performs described plug-in unit.
Further, the one or more described plug-in unit of described making module making.
Further, described plug-in unit comprises bibliographic structure plug-in unit and the interface notification information insert of FTP.
Further, described execution module comprises general service function sub-modules and pin function submodule, wherein, pin function submodule makes described main frame be loaded into described plug-in unit category information table and perform described plug-in unit, and general service function sub-modules makes described main frame perform general service function.
First the present invention defines interface and the program structure of main frame and plug-in unit, then main frame and plug-in unit is made respectively by described interface and program structure, thus main frame and each plug-in unit have unified interface, can reduce and develop the card i/f of multiple kind or the time of main frame interface, thus shorten the development time of plug-in unit software systems.
According to hereafter by reference to the accompanying drawings to the detailed description of the specific embodiment of the invention, those skilled in the art will understand above-mentioned and other objects, advantage and feature of the present invention more.
Accompanying drawing explanation
Hereinafter describe specific embodiments more of the present invention with reference to the accompanying drawings by way of example, and not by way of limitation in detail.Reference numeral identical in accompanying drawing denotes same or similar parts or part.It should be appreciated by those skilled in the art that these accompanying drawings may not be drawn in proportion.In accompanying drawing:
Fig. 1 is the process flow diagram melting forwarding method according to an embodiment of the invention based on the plug-in unit of java;
Fig. 2 is the main frame process chart melting forwarding method according to an embodiment of the invention based on the plug-in unit of java;
Fig. 3 is according to an embodiment of the invention based on the structural framing figure of the plug-in unit development system of java.
Embodiment
Plug-in unit based on java melts a forwarding method, and this method generally comprises following steps:
A, the interface of definition main frame and plug-in unit and program structure.
B, makes main frame and plug-in unit respectively by described interface and program structure.
C, definition plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table.
D, is compiled as jar bag, is placed on the plug-in unit catalogue of described main frame by described plug-in unit.
E, described main frame is loaded into according to described plug-in unit category information table and performs described plug-in unit.
Forwarding method is melted from the above plug-in unit based on java, first the present invention defines interface and the program structure of main frame and plug-in unit, then main frame and plug-in unit is made respectively by described interface and program structure, thus main frame and each plug-in unit have unified interface, can reduce and develop the card i/f of multiple kind or the time of main frame interface, thus shorten the development time of plug-in unit software systems.
Fig. 1 is the process flow diagram melting forwarding method according to an embodiment of the invention based on the plug-in unit of java.In the embodiment shown in fig. 1, this method comprises the steps:
Step 101, the interface of definition main frame and plug-in unit and program structure.In this step, mainly by unified for the interface of main frame and plug-in unit, and the unified program structure later will used.
Example interface:
Exemplary program structures:
Com.tvm.sort.plugin: plug-in unit entrance class catalogue
Com.tvm.sort.protocol: communication protocol catalogue
Only schematically enumerate an interface and program structure above, in other embodiments, described interface and program structure can also for other forms needed.
Step 102, develops main frame and plug-in unit by the interface defined and program structure.Be different from prior art the method making coupling plug-in unit after first having main frame, the present invention itself has same communication protocol and interface when main frame and plug-in unit, thus can save the time of exploitation card i/f.
Step 103, definition plug-in unit category information table, by plug-in unit entrance class file address stored in.
Such as: com.tvm.sort.plugin.Distribute
Step 104, is compiled as jar bag, is placed on main frame plug-in unit catalogue by plug-in unit.
Step 105, main frame is loaded into according to plug-in unit category information table and performs.
Plug-in unit based on java of the present invention melts forwarding method, and independence is high, can develop for the service of personalization with card format, dispose and reach the standard grade and not affect the operation of main frame.For the video distribution service of company, each client requires completely inconsistent to the bibliographic structure and interface notification that upload to oneself FTP, but company's distribution services flow process is fixing, the bibliographic structure plug-in unit that therefore can make different FTP meets Bu Tong customer personalized demand with interface notification information insert, simultaneously again without the need to changing main frame, greatly reduce cost of development.When there being new customer demand to propose other individual demand, also can be met by fast Development plug-in unit.
Fig. 2 is the main frame process chart melting forwarding method according to an embodiment of the invention based on the plug-in unit of java, mainly comprises step 201-step 7, particularly:
Step 201: main frame starts.
Step 202: reflection is loaded into plug-in unit category information table.Utilize the reflex mechanism of java, the mode that described main frame is loaded into unknown class by reflex mechanism is loaded into described plug-in unit category information table.
Step 203: perform main frame general service function.
Step 204: perform individual business plug-in unit, comprise n plug-in unit in fig. 2, wherein n is greater than 2.In other embodiments, also one or two plug-in unit can be only set as required.Plug-in unit in Fig. 2 comprises two classes: information reprocessing plug-in unit and interface notification information insert, and wherein information reprocessing plug-in unit can be the bibliographic structure plug-in unit of FTP particularly.
Step 205: main frame follow-up business.The function that in follow-up business and step 204, plug-in unit realizes herein has nothing to do, and states so do not run business into particular one, and only as a kind of citing, whether described follow-up business can have the plug-in unit of new registration for main frame detection and unload existing plug-in unit.
Step 206: terminate.
Fig. 3 discloses a kind of plug-in unit development system based on java based on the structural framing figure of the plug-in unit development system of java, Fig. 3 according to an embodiment of the invention, comprising:
Build module 1, described structure module 1 defines interface and the program structure of main frame and plug-in unit.
Make module 12, described making module 12 makes main frame and plug-in unit respectively by described interface and program structure.As required, the one or more described plug-in unit of described making module making.
Build module 2 13, described structure module 2 13 defines plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table.
Collector 14, described plug-in unit is compiled as jar bag by described collector 14, is placed on the plug-in unit catalogue of described main frame.
Execution module 15, described execution module 15 makes described main frame be loaded into according to described plug-in unit category information table and performs described plug-in unit.Execution module 15 comprises general service function sub-modules and pin function submodule, wherein, pin function submodule makes described main frame be loaded into described plug-in unit category information table and perform described plug-in unit, and general service function sub-modules makes described main frame perform general service function.
To melt forwarding method identical with the plug-in unit based on java, first plug-in unit development system based on java of the present invention defines interface and the program structure of main frame and plug-in unit, then main frame and plug-in unit is made respectively by described interface and program structure, thus main frame and each plug-in unit have unified interface, can reduce and develop the card i/f of multiple kind or the time of main frame interface, thus shorten the development time of plug-in unit software systems.
So far, those skilled in the art will recognize that, although multiple exemplary embodiment of the present invention is illustrate and described herein detailed, but, without departing from the spirit and scope of the present invention, still can directly determine or derive other modification many or amendment of meeting the principle of the invention according to content disclosed by the invention.Therefore, scope of the present invention should be understood and regard as and cover all these other modification or amendments.
Claims (9)
1. the plug-in unit based on java melts a forwarding method, it is characterized in that, comprises the steps:
A, the interface of definition main frame and plug-in unit and program structure;
B, makes main frame and plug-in unit respectively by described interface and program structure;
C, definition plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table;
D, is compiled as jar bag, is placed on the plug-in unit catalogue of described main frame by described plug-in unit;
E, described main frame is loaded into according to described plug-in unit category information table and performs described plug-in unit.
2. method according to claim 1, is characterized in that,
The quantity of described plug-in unit is one or more.
3. method according to claim 1, is characterized in that,
Described plug-in unit comprises bibliographic structure plug-in unit and the interface notification information insert of FTP.
4. method according to claim 1, is characterized in that, described step e comprises:
Described main frame is loaded into described plug-in unit category information table;
Described main frame performs general service function;
Described main frame performs described plug-in unit.
5. method according to claim 4, is characterized in that,
The mode that described main frame is loaded into unknown class by reflex mechanism is loaded into described plug-in unit category information table.
6., based on a plug-in unit development system of java, it is characterized in that, comprising:
Build module one, described structure module one defines interface and the program structure of main frame and plug-in unit;
Make module, described making module makes main frame and plug-in unit respectively by described interface and program structure;
Build module two, described structure module two defines plug-in unit category information table, and by the plug-in unit entrance class file address of described plug-in unit stored in described plug-in unit category information table;
Collector, described plug-in unit is compiled as jar bag by collector, is placed on the plug-in unit catalogue of described main frame;
Execution module, described execution module makes described main frame be loaded into according to described plug-in unit category information table and performs described plug-in unit.
7. system according to claim 6, is characterized in that,
The one or more described plug-in unit of described making module making.
8. system according to claim 6, is characterized in that,
Described plug-in unit comprises bibliographic structure plug-in unit and the interface notification information insert of FTP.
9. system according to claim 6, is characterized in that, described execution module comprises general service function sub-modules and pin function submodule, wherein,
Pin function submodule makes described main frame be loaded into described plug-in unit category information table and perform described plug-in unit, and general service function sub-modules makes described main frame perform general service function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099112.7A CN104932928A (en) | 2014-03-17 | 2014-03-17 | Plug-in development method and system based on java |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410099112.7A CN104932928A (en) | 2014-03-17 | 2014-03-17 | Plug-in development method and system based on java |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104932928A true CN104932928A (en) | 2015-09-23 |
Family
ID=54120103
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410099112.7A Pending CN104932928A (en) | 2014-03-17 | 2014-03-17 | Plug-in development method and system based on java |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104932928A (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528184A (en) * | 2016-12-29 | 2017-03-22 | 山东浪潮商用***有限公司 | App development method based on cordova platform |
CN106648559A (en) * | 2015-10-28 | 2017-05-10 | 广东电网有限责任公司佛山供电局 | Android application pluggable development system and method |
CN107122219A (en) * | 2017-03-31 | 2017-09-01 | 腾讯科技(深圳)有限公司 | The acquisition methods and device of installation file |
WO2018086268A1 (en) * | 2016-11-14 | 2018-05-17 | 平安科技(深圳)有限公司 | Packaging method, device, and terminal employing plugin format, and storage medium |
CN108446141A (en) * | 2018-02-28 | 2018-08-24 | 武汉智博创享科技股份有限公司 | A kind of web front end plug-in unit and the method for being scheduled and communicating based on web front end plug-in unit |
CN110333848A (en) * | 2019-05-08 | 2019-10-15 | 重庆天蓬网络有限公司 | The method for making eclipse development platform plug-in unit by oneself |
CN110633155A (en) * | 2018-05-31 | 2019-12-31 | 北京京东尚科信息技术有限公司 | Communication method, device, medium and electronic equipment of plug-in framework |
CN116414386A (en) * | 2023-01-18 | 2023-07-11 | 之江实验室 | Plug-in development system and method based on VUE |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127076A1 (en) * | 2006-11-27 | 2008-05-29 | Mcardle James Michael | jmx bean custom service extension plugin agent for an application server |
CN102109981A (en) * | 2009-12-25 | 2011-06-29 | 奥林网络科技(宁波)有限公司 | Real-time communication universal plug-in |
US20110185189A1 (en) * | 2010-01-26 | 2011-07-28 | Kyocera Mita Corporation | SDK Use-Restriction Imposing Device, Use-Restriction-Imposed SDK Developing System, and SDK Use-Restriction Imposing Method |
CN102411506A (en) * | 2011-07-07 | 2012-04-11 | 杭州典能科技有限公司 | Java-system business-unit plug-in type managing system and dynamic business-function changing method |
-
2014
- 2014-03-17 CN CN201410099112.7A patent/CN104932928A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080127076A1 (en) * | 2006-11-27 | 2008-05-29 | Mcardle James Michael | jmx bean custom service extension plugin agent for an application server |
CN102109981A (en) * | 2009-12-25 | 2011-06-29 | 奥林网络科技(宁波)有限公司 | Real-time communication universal plug-in |
US20110185189A1 (en) * | 2010-01-26 | 2011-07-28 | Kyocera Mita Corporation | SDK Use-Restriction Imposing Device, Use-Restriction-Imposed SDK Developing System, and SDK Use-Restriction Imposing Method |
CN102411506A (en) * | 2011-07-07 | 2012-04-11 | 杭州典能科技有限公司 | Java-system business-unit plug-in type managing system and dynamic business-function changing method |
Non-Patent Citations (1)
Title |
---|
刘洪霞: "平台+插件技术在有效载荷监视***中的应用研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106648559A (en) * | 2015-10-28 | 2017-05-10 | 广东电网有限责任公司佛山供电局 | Android application pluggable development system and method |
WO2018086268A1 (en) * | 2016-11-14 | 2018-05-17 | 平安科技(深圳)有限公司 | Packaging method, device, and terminal employing plugin format, and storage medium |
US10387169B2 (en) | 2016-11-14 | 2019-08-20 | Ping An Technology (Shenzhen) Co., Ltd. | Plug-in packaging method, device, terminal and storage media |
CN106528184A (en) * | 2016-12-29 | 2017-03-22 | 山东浪潮商用***有限公司 | App development method based on cordova platform |
CN107122219A (en) * | 2017-03-31 | 2017-09-01 | 腾讯科技(深圳)有限公司 | The acquisition methods and device of installation file |
CN108446141A (en) * | 2018-02-28 | 2018-08-24 | 武汉智博创享科技股份有限公司 | A kind of web front end plug-in unit and the method for being scheduled and communicating based on web front end plug-in unit |
CN110633155A (en) * | 2018-05-31 | 2019-12-31 | 北京京东尚科信息技术有限公司 | Communication method, device, medium and electronic equipment of plug-in framework |
CN110333848A (en) * | 2019-05-08 | 2019-10-15 | 重庆天蓬网络有限公司 | The method for making eclipse development platform plug-in unit by oneself |
CN116414386A (en) * | 2023-01-18 | 2023-07-11 | 之江实验室 | Plug-in development system and method based on VUE |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104932928A (en) | Plug-in development method and system based on java | |
CN103955364B (en) | A kind of front end assemblies method suitable for mobile phone | |
US8191039B2 (en) | Developmental tool and method for automating detection and construction of notification-based component applications | |
CN108984712A (en) | Counting method, equipment and readable storage medium storing program for executing are made based on business scenario | |
CN109495584B (en) | Internet of things equipment access method, device, equipment and medium | |
US20060235928A1 (en) | System and method for creating a mapping document for binding messages between an application and an associated backend server | |
CN102087594B (en) | Management method and device for extension point and plugins | |
CN111367818B (en) | System component testing method and device based on dynamic data return | |
CN103647817A (en) | Application uploading method | |
CN109995643A (en) | Business mail push method and device | |
CN110213163B (en) | Routing forwarding method and device based on nginx and zuul | |
CN109446648B (en) | Simulation service establishing method and device | |
CN107294750A (en) | A kind of distribution configuring management method and device for converging group energy self-identifying | |
CN101046746B (en) | Code management in a distributed software development environment | |
CN104965829A (en) | Method, server and system for classifying terminal applications | |
CN109634641A (en) | A kind of application program update method, apparatus, electronic equipment and medium | |
CN106775806A (en) | A kind of method of private clound application of upgrading | |
CN105635257A (en) | Method and system for automatically detecting data update | |
US9235437B2 (en) | Method and integration component for integrating OSGi environments into a Service-oriented Architecture | |
US11029923B2 (en) | Technical building block | |
CN106095511A (en) | A kind of server updating method and apparatus | |
CN108334374A (en) | The method and apparatus of component dynamic load and execution | |
CN111176652A (en) | Application program management method, device, equipment and medium | |
CN109857374A (en) | The development approach and device of mobile application | |
CN109150694A (en) | Sending method, display methods and the server and mobile terminal of dynamic scene information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150923 |
|
RJ01 | Rejection of invention patent application after publication |