CN104951323B - Java middlewares and its driving calling, loading method and conversion equipment - Google Patents
Java middlewares and its driving calling, loading method and conversion equipment Download PDFInfo
- Publication number
- CN104951323B CN104951323B CN201410121126.4A CN201410121126A CN104951323B CN 104951323 B CN104951323 B CN 104951323B CN 201410121126 A CN201410121126 A CN 201410121126A CN 104951323 B CN104951323 B CN 104951323B
- Authority
- CN
- China
- Prior art keywords
- data
- function
- exchange
- java
- middlewares
- 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.)
- Active
Links
Abstract
An embodiment of the present invention provides Java middlewares and its driving to call, loading method and conversion equipment, Java middlewares by different driving program by being encapsulated as Universal peripheral data exchange module, and the Universal peripheral data exchange interface of conventional data function of exchange is provided to caller, when application program is called specified driver, conversion equipment determines application program by the conventional data function of exchange of specified driver to be used, and call request is sent to Java middlewares using the corresponding Universal peripheral data exchange interface of the conventional data function of exchange, Java middlewares are received after call request, the specified driver encapsulated to itself sends load request.Improve the Universal and scalability of driver in Java middlewares.The present invention relates to field of computer technology.
Description
Technical field
The present invention relates to mobile communication technology field more particularly to Java middlewares and its driving call, loading method and
Conversion equipment.
Background technology
Java middlewares (middleware) are a major class of basic software, belong to the scope of reusable software.From system
It is seen in the relationship of structure longitudinal direction, as shown in Figure 1, Java middlewares are in the centre of operating system software and the application software of user,
The isomery of operation and development environment, downward masking operation system and hardware resource is provided upwards for the application software on upper strata;From with
It is seen in the horizontal relationship of application system, as shown in Fig. 2, Java middlewares provide general development interface, it is various application programs
Calling interface is provided, lower layer support is provided for application system.
Standard interface can bring good portability to application program, and the communication protocol of standard can simplify system friendship
Mutually, interoperability is improved.Java middlewares shield operating system and the realization details of hardware and isomery characteristic, are application program
Provide a metastable higher layer applications environment.If the computer hardware and system software of bottom are updated, only
Java middlewares are upgraded, the interface for keeping Java middlewares external is constant, and application software is almost not required to change, and improving should
With the reusability of software.
The characteristics of Java middlewares, is as follows:1. by providing general interface, meet the needs of extensive application.2. it runs on
Multiple hardwares and OS platforms.3. supporting Distributed Calculation, the application or service of the transparency of across a network, hardware and OS platforms are provided
Interactive function.4 support the agreement of standard, support the interface of standard.
Further, the operation of peripheral hardware is related to for application program, is the operate interface by the way that peripheral hardware driving is called to provide
It completes.Peripheral hardware is driven to application development and provides general interface.Java middlewares can be by the driving of certain kind equipment
It is encapsulated into itself, and operate interface, downward shielding device isomery is provided upwards instead of device drives.When exploitation Java middlewares
It is on platform in application, application program can directly invoke Java middlewares offer equipment operation interface, just as call Java
The core library (Core Libraries) and the interface one of third party library (Third-party Libraries) that middleware provides
Sample.
In existing technical solution, application program can use peripheral hardware in several ways, but want normal use peripheral hardware,
Peripheral hardware driving has to correctly install, for application call.Such as can peripheral hardware be obtained by following manner and driven:1st, manually
It downloads, installation driving;2nd, the driving that system carries;3rd, store driving on peripheral hardware;4th, Java middlewares provide the driving of peripheral hardware.
That is when pass-through mode 4, that is, the mode that the driving of certain class peripheral hardware is encapsulated into Java middlewares obtains peripheral hardware drive
It is dynamic, it is not necessary to obtain such by other means again and drive.
Fig. 3 is the call graph of driver that the application program that the prior art provides is provided with Java middlewares, such as
Shown in Fig. 3, it is limited that pass-through mode 4, which is driven the versatility of acquisition and the scope of application,.First, the inside of same class peripheral hardware
It realizes there is no unified standard, realizes that details is different, it may be necessary to which different drivers make application program correctly make
With peripheral hardware, i.e. a driver is difficult all to work to same class peripheral hardware, and the isomery of equipment limits the general of driver
Property.Java middlewares need
Upper level applications provide interface so that the poor universality of driver in Java middlewares;Secondly, the type of peripheral hardware is a variety of more
Sample, and with the growth of people's demand and the development of science and technology, can constantly there is new peripheral hardware to occur, the equipment in Java middlewares is driven
What dynamic value volume and range of product was to determine, so, the poor expandability of the mode of Java middlewares curing driving.
Invention content
An embodiment of the present invention provides Java middlewares and its driving calling, loading method and conversion equipment, to solve
The problem of Universal and scalability of the mode of Java middlewares curing driving is poor in the prior art.
A kind of driving call method based on Java middlewares provided in an embodiment of the present invention, including:
Receive the calling instruction of the specified driver of calling that application program is sent;
According to the function module of the specified driver called indicated in the calling instruction of reception, determine described
The function that function module is provided, the conventional data of Universal peripheral data exchange module exchanges work(in corresponding Java middlewares
Can,
Wherein, each driving journey of platform where the Universal peripheral data exchange module is packaged with the Java middlewares
Sequence makes the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, described
Conventional data function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides for calling
State conventional data function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Using the determining corresponding Universal peripheral data exchange interface of the conventional data function of exchange, into the Java
Between part send the call request for calling the conventional data function of exchange.
A kind of drive load method based on Java middlewares provided in an embodiment of the present invention, including:
By the Universal peripheral data exchange interface in Java middlewares, receive to the Universal peripheral data exchange interface
The call request of corresponding conventional data function of exchange, wherein, the Universal peripheral data are carried in the call request and are handed over
Change the mold the mark of the specified driver of block encapsulation;
Wherein, each driving journey of platform where the Universal peripheral data exchange module is packaged with the Java middlewares
Sequence makes the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, described
Conventional data function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides for calling
State conventional data function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
According to the mark of the specified driver, the provided function of loading is corresponding with the conventional data function of exchange
, the function module of the specified driver.
A kind of conversion equipment provided in an embodiment of the present invention, including:
Receiving module, for receiving the calling instruction of the specified driver of the calling of application program transmission;
Determining module calls the specified drive called indicated in instruction for what is received according to the receiving module
The function module of dynamic program determines that Universal peripheral data are handed in the corresponding Java middlewares of function that the function module is provided
The conventional data function of exchange of block is changed the mold,
Wherein, each driving journey of platform where the Universal peripheral data exchange module is packaged with the Java middlewares
Sequence makes the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, described
Conventional data function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides for calling
State conventional data function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Calling module, for the corresponding Universal peripheral of the conventional data function of exchange determined using the determining module
Data exchange interface sends the call request for calling the conventional data function of exchange to the Java middlewares.
A kind of Java middlewares provided in an embodiment of the present invention, including:
Universal peripheral data exchange module for being packaged with each driver of Java middlewares place platform, makes
The function that the function module of each driver after encapsulation is provided is corresponding with conventional data function of exchange respectively, the general number
Include the combination of following one or more functions according to function of exchange:Reading and writing and control;And it provides described general for calling
Data exchanging function, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Receiving module, for the Universal peripheral data exchange interface provided by the Universal peripheral data exchange module,
The call request to the corresponding conventional data function of exchange of the Universal peripheral data exchange interface is received, wherein, the calling
The mark of the specified driver of the Universal peripheral data exchange module encapsulation is carried in request;
Load-on module, for the mark according to the specified driver, the provided function of loading and the general number
According to the function module of corresponding, the described specified driver of function of exchange.
The advantageous effect of the embodiment of the present invention includes:
Java middlewares provided in an embodiment of the present invention and its driving are called, loading method and conversion equipment, among Java
Part provides conventional data function of exchange by the way that different driving program is encapsulated as Universal peripheral data exchange module to caller
Universal peripheral data exchange interface so that caller can ignore distinct device when being called to specified driver
Isomerism, by unified conventional data Fabric Interface to specify driver conventional data function of exchange be called.
That is, when application program is called specified driver, it can be first by being located among application program and Java
Conversion equipment between part determines application program by the conventional data function of exchange of specified driver to be used, and utilizes
The corresponding Universal peripheral data exchange interface of the conventional data function of exchange sends call request to Java middlewares, among Java
After part receives call request, the specified driver encapsulated to itself sends load request.It is provided in an embodiment of the present invention
Java middlewares improve Java middlewares and drive the abstraction hierarchy that interface is provided to application, are no longer required for different driving
The inhomogeneity peripheral hardware of program and the same class peripheral hardware with different driving program are provided which different operate interfaces, and encapsulate
Most basic peripheral data Fabric Interface is provided to upper strata in the driver of Java middlewares.The behaviour of different peripheral will be directed to
It is further abstracted as interface, obtains the data exchange operation of most basic, general Java middlewares and peripheral hardware.With it is existing
The mode of Java middlewares curing driving is compared in technology, is improved the versatility of driver in Java middlewares and can be expanded
Malleability.
Description of the drawings
Fig. 1 is the Java middleware architectures longitudinal direction relational graph that background technology provides;
Fig. 2 is the Java middleware architecture horizontal relationship figures that background technology provides;
Fig. 3 is the call graph of driver that the application program that background technology provides is provided with Java middlewares;
Fig. 4 is a kind of driving call method flow chart based on Java middlewares provided in an embodiment of the present invention;
Fig. 5 is a kind of drive load method flow diagram based on Java middlewares provided in an embodiment of the present invention;
Fig. 6 is the call relation signal of application program, conversion equipment and Java middlewares that the embodiment of the present invention 1 provides
Figure;
Fig. 7 is a kind of driving call method flow chart based on Java middlewares that the embodiment of the present invention 2 provides;
Fig. 8 is a kind of drive load method flow diagram based on Java middlewares that the embodiment of the present invention 3 provides;
Fig. 9 is a kind of structure diagram of conversion equipment provided in an embodiment of the present invention;
Figure 10 is a kind of structure diagram of the drive load device based on Java middlewares provided in an embodiment of the present invention.
Specific embodiment
An embodiment of the present invention provides Java middlewares and its calling, loading method and conversion equipment are driven, below in conjunction with
Figure of description illustrates the preferred embodiment of the present invention, it should be understood that preferred embodiment described herein is only used for
The description and interpretation present invention, is not intended to limit the present invention.And in the absence of conflict, the embodiment and reality in the application
Applying the feature in example can be combined with each other.
The embodiment of the present invention provides a kind of driving call method based on Java middlewares, as shown in figure 4, including:
S401, the calling instruction of the specified driver of calling that application program is sent is received.
S402, the function mould of the specified driver called indicated in being indicated according to the calling received in S401
Block, determines the function that the function module is provided, the general number of Universal peripheral data exchange module in corresponding Java middlewares
According to function of exchange,
Wherein, each driver of platform, makes encapsulation where Universal peripheral data exchange module is packaged with Java middlewares
The function that the function module of each driver afterwards is provided is corresponding with conventional data function of exchange respectively, and conventional data exchanges work(
It can include the combination of following one or more functions:Reading and writing and control;And it provides to call conventional data function of exchange
, corresponding with conventional data function of exchange Universal peripheral data exchange interface.
S403, using in S402 determine the corresponding Universal peripheral data exchange interface of conventional data function of exchange, to
Java middlewares send the call request for calling conventional data function of exchange.
With method shown in above-mentioned Fig. 4 correspondingly, the embodiment of the present invention also provides a kind of driving based on Java middlewares adds
Support method, applied to Java middlewares side, as shown in figure 5, including:
S501, by the Universal peripheral data exchange interface in Java middlewares, receive and Universal peripheral data exchange connect
The call request of the corresponding conventional data function of exchange of mouth, wherein, Universal peripheral data exchange module is carried in call request
The mark of the specified driver of encapsulation;
Each driver of platform, makes each after encapsulation where Universal peripheral data exchange module is packaged with Java middlewares
The function that the function module of driver is provided is corresponding with conventional data function of exchange respectively, and conventional data function of exchange includes
The combination of following one or more functions:Reading and writing and control;And provide for call conventional data function of exchange, with it is logical
With the corresponding Universal peripheral data exchange interface of data exchanging function.
S502, according to the mark of specified driver received in S501, the provided function of loading is handed over conventional data
Change the function module of corresponding, the specified driver of function.
Further, it is polymorphic be Object-oriented Programming Design (OOP) an important feature, it is polymorphic that refer to same entity same
When there are diversified forms, in java applet design, refer to same interface with different realization methods.It is i.e. same to act on
Different objects can have different explanations, generate different implementing results.Due to the encapsulation of Java middlewares in the prior art
Driver is for a certain kind equipment, and distinct device is unable to universal driver.Therefore, it can introduce towards right
The polymorphic thought as in improves Java middlewares and drives the abstraction hierarchy that interface is provided to application, is no longer required for driver and carries
For the operate interface of a kind equipment, and the driver for being encapsulated in Java middlewares only provides most basic data to application layer and hands over
Alias (such as:Reading and writing, control etc.).
Below in conjunction with the accompanying drawings, method provided by the invention and relevant device are described in detail with specific embodiment.
Embodiment 1:
The embodiment of the present invention 1 provides a kind of Java middlewares, and the Java middlewares that the embodiment of the present invention 1 provides include general
Peripheral data Switching Module, each driver of platform where which is packaged with Java middlewares,
Make the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, conventional data
Function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides that conventional data is called to hand over
Change function, corresponding with conventional data function of exchange Universal peripheral data exchange interface.
It, can be by calling Universal peripheral number in development and application on Java middleware platforms provided in an embodiment of the present invention
Different peripheral hardwares is used according to Fabric Interface, still, application program needs to realize common peripheral hardware operation to peripheral hardware conventional data
The conversion of swap operation.
That is, still device Drivers can be used to provide when the application program on upper strata operates peripheral hardware
The proprietary function module of the peripheral hardware, and in order to realize the Universal and scalability of Java middlewares, Java middlewares will be different
The different function module abstracts that device Drivers provide are conventional data function of exchange, and therefore, the application program on upper strata is right
When peripheral hardware is operated, the function module that will be used is needed to be converted into corresponding conventional data function of exchange, the operation of the conversion
It can be realized by application program, can also be used as conversion equipment, between application program and Java middlewares, the friendship for the two
Mutually carry out the conversion and transmission of data.
Fig. 6 is the call graph of application program, conversion equipment and Java middlewares.It in figure 6, should for different
There is different conversion equipments 602 with 601 exploitations, different applications 601 is carried by corresponding conversion equipment 602 and Java middlewares
The Universal peripheral data exchange module 603 for encapsulating different drivers supplied interacts, and calls what itself was needed indirectly
Driver.Although conversion operation needs to increase the workload of application developer, to increase exploitation complexity as generation
Valency is highly to increase the versatility of Java middlewares curing peripheral hardware driving and the scope of application.
Further, Java middlewares provided in an embodiment of the present invention, provide Universal peripheral data exchange module 603, often
A Universal peripheral data exchange module encapsulates the driver of different peripheral, and the corresponding different data of different driving program
Structure, is also packaged into unified common data structure respectively, and Universal peripheral data exchange module 603 provides conventional data and exchanges work(
Energy.For each conventional data function of exchange, corresponding Universal peripheral data exchange interface is provided so that caller passes through calling
The corresponding conventional data that Universal peripheral data exchange interface can use the Universal peripheral data exchange module 603 to provide exchanges
Function.
Further, the driver of different peripheral provides different function module, in the embodiment of the present invention, will it is various outside
If the function module that different drivers includes is abstracted into conventional data function of exchange, such as:Reading and writing, control, and be directed to
Different data exchanging functions provides corresponding Universal peripheral data exchange interface, such as:It reads interface, write interface, control interface,
Also, various peripheral hardwares can provide above-mentioned one or more kinds of conventional data functions of exchange according to the situation of itself, then, needle
To different peripheral hardwares, by the calling of the reading interface of the peripheral hardware, it can realize the read operation to the peripheral hardware, pass through writing for the peripheral hardware
The calling of interface can realize the write operation to the peripheral hardware, by the calling of the control interface to the peripheral hardware, can realize to this
The control operation of peripheral hardware.That is, different peripheral hardwares can be by Universal peripheral data exchange interface, to pair of the peripheral hardware
The conventional data function of exchange answered is used;
And the driver of different peripheral has the different data structures itself supported, is passing through Universal peripheral data
Fabric Interface carries out in use, can be related to the exchange of data, for not the corresponding conventional data function of exchange of the peripheral hardware
Different data structures, can be converted into unified conventional data by the corresponding different data structure with the driver of peripheral hardware
Structure, and based on common data structure, the conventional data function of exchange provided using the peripheral hardware.In this way, the embodiment of the present invention carries
The driver abstracts of different peripheral are Universal peripheral data exchange module, and different peripheral are driven by the Java middlewares of confession
The different function module abstracts that dynamic program includes are corresponding general into conventional data function of exchange and conventional data function of exchange
Peripheral data Fabric Interface, the otherness of the different peripheral of shielding improve the general of the mode that the curing of Java middlewares drives
Property and scalability.
By taking network interface card as an example, trawl performance can provide transmission data operation, receive data manipulation and the control to network interface card
Trawl performance can be encapsulated as Universal peripheral data exchange module by operation, Java middlewares provided in an embodiment of the present invention, will
The data structure for the network data for sending or receiving is converted to unified common data structure, will be to trawl performance transmission data
Operation be encapsulated as the write operation of conventional data function of exchange, the operation that data are received from trawl performance is encapsulated as conventional data
The read operation of function of exchange will in order to control operate, and with the operation of network-driven interaction control data encapsulation for trawl performance
Each conventional data function of exchange provided provides corresponding Universal peripheral data exchange interface.
By taking keyboard as an example, keyboard drive can provide the operation for reading keyboard data and the operation of interaction control data,
Keyboard drive can be encapsulated as Universal peripheral data exchange module by Java middlewares provided in an embodiment of the present invention, by keyboard number
According to data structure be converted to unified common data structure, the operation of reading keyboard data that keyboard drive provides is encapsulated as
The read operation of conventional data function of exchange, the control that the operation of interaction control data is encapsulated as to conventional data function of exchange are grasped
Make, and each conventional data function of exchange provided for keyboard drive provides corresponding Universal peripheral data exchange interface.
Further, Java middlewares provided in an embodiment of the present invention can also include package module, for working as in Java
Between part based on platform in add driver, and the corresponding data structure of driver of the addition in Java middlewares
When the corresponding data structure of different driving of encapsulation is different, the corresponding data structure of the driver of the addition is packaged into logical
With data structure, and the driver of the addition is packaged into Universal peripheral data exchange module.
That is, when certain driving encapsulated in the corresponding data structure of the driver of the addition and Java middlewares
When corresponding data structure is identical, which has been encapsulated as unified common data structure, then application program can
The driver of the addition is called with the Universal peripheral data exchange interface for directly Java middlewares being used to provide, because, Java
Middleware can carry out conversion process to the data of the driver of the addition;And if the corresponding number of the driver of the addition
During according to structure and the different corresponding data structure of different driving encapsulated in Java middlewares, need the driving of the addition
The corresponding data structure of program is packaged into common data structure, and the driver of the addition is packaged into Universal peripheral data and is handed over
Block is changed the mold, so that application program is called, when specific implementation can add this by the form of Java middleware updating operations
The driver added is packaged.
It can be seen that it in the prior art, when adding driver, is required to Java middlewares and is set for the driver
New interface is put, and application program needs the driver of the addition to be called by the new interface, and the present invention is implemented
The Java middlewares that example provides, when certain drive encapsulated in the corresponding data structure of the driver of the addition and Java middlewares
When moving corresponding data structure all same, application program directly can call the addition by Universal peripheral data exchange interface
Driver, Java middlewares do not need to be packaged the driver of the addition, improve in Java middlewares and drive journey
The Universal and scalability of sequence.
Embodiment 2:
Based on the Java middlewares that the embodiment of the present invention 1 provides, the embodiment of the present invention 2 provides a kind of based on Java middlewares
Driving call method, applied to 602 side of conversion equipment among application program and Java middlewares, as shown in fig. 7, packet
Include following steps:
S701, the calling instruction of the specified driver of calling that application program is sent is received.
In this step, the mark that specified driver can be carried in instruction is called, so that Java middlewares are according to this
Mark determines the driver that application program needs call.
S702, the function module of specified driver called indicated in being indicated according to the calling received in S701,
Determine that the conventional data of Universal peripheral data exchange module in the corresponding Java middlewares of function that the function module is provided is handed over
Change function.
In this step, it is assumed that specified driver is trawl performance, calls and the function of calling trawl performance is indicated in instruction
Module is receives data module, then Universal peripheral number in the corresponding Java middlewares of function that the reception data module is provided
Conventional data function of exchange according to Switching Module can be read through model.
S703, when carrying the business datum for being sent to specified driver in call request, will be taken in call request
The general-purpose service data for business datum being converted into that there is common data structure.
Wherein, common data structure be by Java middlewares based on platform in the corresponding data structure of each driver
The unified common data structure being packaged into.
In this step, when application program needs to carry out write operation to specified peripheral hardware, need to carry in call request and write
Enter the business datum of specified peripheral hardware, and the business datum has data that application program supports, for specified driver
Structure.So, in this step, business datum can be packaged into the general industry with common data structure by conversion equipment 602
Business data use to receive the Java middlewares of the general-purpose service data.
Further, it when not carrying the business datum for being sent to specified driver in call request, can not wrap
Include this step.
S704, using the determining corresponding Universal peripheral data exchange interface of conventional data function of exchange, among Java
Part sends the call request for calling conventional data function of exchange.
In this step, when the mark of specified driver can be carried during calling indicates, carried in the call request
There is the mark of the specified driver, to be sent to Java middlewares.
S705, when the call result of call request be receive specified driver be called the data fed back later when, connect
Receive the general-purpose service data with common data structure of Java middlewares feedback.
S706, the general-purpose service data by reception, are converted to the business datum with the first data structure, wherein, first
The corresponding data structure of driver that data structure is supported for application program, specified.
S707, transformed business datum is fed back into application program.
Further, when the call result of call request does not need to receive the number fed back after specified driver is called
According to when, step S705~S707 can not included.
Embodiment 3:
Based on the Java middlewares that the embodiment of the present invention 1 provides, with embodiment 2 correspondingly, the present embodiment provides a kind of bases
In the drive load method of Java middlewares, applied to Java middlewares side, as shown in figure 8, specifically comprising the following steps:
S801, by Universal peripheral data exchange interface in Java middlewares, receive to Universal peripheral data exchange interface
The call request of corresponding conventional data function of exchange, wherein, Universal peripheral data exchange module envelope is carried in call request
The mark of the specified driver of dress.
S802, when carrying the data for being sent to specified driver in the call request received in S801, will call
The general-purpose service data with common data structure carried in request is converted into the business datum with the second data structure,
In, the second data structure is the corresponding data structure of specified driver.
Further, in this step, different driving program is uniformly packaged by Java middlewares, but in load driver
During program, driver itself has the second data structure itself supported, therefore, in load driver program, needs to have
The general-purpose service data for having common data structure is converted into the business datum with the second data structure.
Further, when not carrying the data for being sent to specified driver in the call request received in S801,
This step can not included.
S803, the mark according to specified driver, the provided function of loading is corresponding with conventional data function of exchange,
The function module of specified driver.
S804, when the call result of call request is to send specified driver to the caller for sending call request to be added
When carrying the business datum fed back later, function module is loaded to the business datum fed back later, is converted to conventional data
The general-purpose service data of structure.
S805, transformed general-purpose service data is fed back to the caller for sending call request.
Further, when the call result of call request does not need to send specified driving to the caller for sending call request
Program be called the business datum fed back later when, step S904~S905 can not included.
Based on same inventive concept, the embodiment of the present invention additionally provides a kind of conversion equipment and Java middlewares, due to this
The principle and a kind of aforementioned driving calling based on Java middlewares, loading method phase that a little devices and middleware solve the problems, such as
Seemingly, therefore the implementation of the device may refer to the implementation of preceding method, and overlaps will not be repeated.
A kind of conversion equipment provided in an embodiment of the present invention, as shown in figure 9, including:
Receiving module 901, for receiving the calling instruction of the specified driver of the calling of application program transmission;
Determining module 902, for according to the receiving module 901 receive calling instruction in indicate called described in
The function module of specified driver, determines general in the corresponding above-mentioned Java middlewares of function that the function module is provided
The conventional data function of exchange of peripheral data Switching Module,
Wherein, each driving journey of platform where the Universal peripheral data exchange module is packaged with the Java middlewares
Sequence makes the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, described
Conventional data function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides for calling
State conventional data function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;;
Calling module 903, for corresponding logical using the determining conventional data function of exchange of the determining module 902
With peripheral data Fabric Interface, the call request for calling the conventional data function of exchange is sent to the Java middlewares.
Further, the conversion equipment, further includes:First modular converter 904;
First modular converter 904 is sent to for working as to carry in the call request of the transmission of calling module 903
During the business datum of the specified driver, before sending the call request to the Java middlewares, by the calling
Business datum is carried in request and is converted into the general-purpose service data with common data structure, wherein, the common data structure
For by the Java middlewares based on platform in the general number of unification that is packaged into of the corresponding data structure of each driver
According to structure.
Further, the conversion equipment, further includes:Second modular converter 905 and feedback module 906;
The receiving module 901 is additionally operable to the call result when the call request to receive the specified driver
During the data fed back later that are called, after call request is sent to the Java middlewares, the Java middlewares are received
The general-purpose service data with common data structure of feedback;
Second modular converter 905 for the general-purpose service data for receiving the receiving module 901, is converted to tool
There is the business datum of the first data structure, wherein, first data structure is the corresponding data knot of the specified driver
Structure;
The feedback module 906, for the 905 transformed business datum of the second modular converter to be fed back to described answer
Use program.
A kind of Java middlewares provided in an embodiment of the present invention, as shown in Figure 10, including:
Universal peripheral data exchange module 1001, for being packaged with each driving journey of Java middlewares place platform
Sequence makes the function that the function module of each driver after encapsulation is provided corresponding with conventional data function of exchange respectively, described
Conventional data function of exchange includes the combination of following one or more functions:Reading and writing and control;And it provides for calling
State conventional data function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Receiving module 1002, the Universal peripheral data for being provided by the Universal peripheral data exchange module 1001 are handed over
Alias receives the call request to the corresponding conventional data function of exchange of the Universal peripheral data exchange interface, wherein, institute
State the mark for the specified driver that the Universal peripheral data exchange module encapsulation is carried in call request;
Load-on module 1003, for the mark according to the specified driver, the provided function of loading is led to described
With the function module of corresponding, the described specified driver of data exchanging function.
Further, the device, further includes:First modular converter 1004;
First modular converter 1004 is sent to the specified drive for working as to carry in the call request received
During the data of dynamic program, in the function module for loading specified driver corresponding with the conventional data function of exchange, described
Before, the general-purpose service data with common data structure carried in the call request is converted into the second data knot
The business datum of structure, wherein, second data structure is the corresponding data structure of the specified driver;The general number
According to structure be by the Java middlewares based on platform in the unification that is packaged into of the corresponding data structure of each driver
Common data structure.
Further, the device, further includes:Second modular converter 1005 and feedback module 1006;
Second modular converter 1005 is to the transmission call request for working as the call result of the call request
Caller when sending the specified driver and being loaded the business datum fed back later, handed in loading and the conventional data
It changes after the function module of the corresponding specified driver of function, the function module is loaded to the business fed back later
Data are converted to the general-purpose service data with common data structure;
The feedback module 1006, for the 1005 transformed general-purpose service data of the second modular converter to be fed back to
Send the caller of the call request.
The function of above-mentioned each unit may correspond to the respective handling step in flow shown in Fig. 4 to Fig. 5, Fig. 7 to Fig. 8,
This is repeated no more.
Java middlewares provided in an embodiment of the present invention and its driving are called, loading method and conversion equipment, among Java
Part provides conventional data function of exchange by the way that different driving program is encapsulated as Universal peripheral data exchange module to caller
Universal peripheral data exchange interface so that caller can ignore distinct device when being called to specified driver
Isomerism, by unified conventional data Fabric Interface to specify driver conventional data function of exchange be called.
That is, when application program is called specified driver, it can be first by being located among application program and Java
Conversion equipment between part determines application program by the conventional data function of exchange of specified driver to be used, and utilizes
The corresponding Universal peripheral data exchange interface of the conventional data function of exchange sends call request to Java middlewares, among Java
After part receives call request, the specified driver encapsulated to itself sends load request.It is provided in an embodiment of the present invention
Java middlewares improve Java middlewares and drive the abstraction hierarchy that interface is provided to application, are no longer required for different driving
The inhomogeneity peripheral hardware of program and the same class peripheral hardware with different driving program are provided which different operate interfaces, and encapsulate
Most basic peripheral data Fabric Interface is provided to upper strata in the driver of Java middlewares.The behaviour of different peripheral will be directed to
It is further abstracted as interface, obtains the data exchange operation of most basic, general Java middlewares and peripheral hardware.With it is existing
The mode of Java middlewares curing driving is compared in technology, is improved the versatility of driver in Java middlewares and can be expanded
Malleability.
Through the above description of the embodiments, those skilled in the art can be understood that the embodiment of the present invention
The mode of necessary general hardware platform can also be added to realize by software by hardware realization.Based on such reason
Solution, the technical solution of the embodiment of the present invention can be embodied in the form of software product, which can be stored in one
A non-volatile memory medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in, it is used including some instructions so that a meter
It calculates machine equipment (can be personal computer, server or the network equipment etc.) and performs side described in each embodiment of the present invention
Method.
It will be appreciated by those skilled in the art that attached drawing is the schematic diagram of a preferred embodiment, module or stream in attached drawing
Journey is not necessarily implemented necessary to the present invention.
It will be appreciated by those skilled in the art that the module in device in embodiment can describe be divided according to embodiment
It is distributed in the device of embodiment, respective change can also be carried out and be located in one or more devices different from the present embodiment.On
The module for stating embodiment can be merged into a module, can also be further split into multiple submodule.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
God and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (13)
1. a kind of driving call method based on Java middlewares, which is characterized in that including:
Receive the calling instruction of the specified driver of calling that application program is sent;
According to the function module of the specified driver called indicated in the calling instruction of reception, the function is determined
The function that module is provided, the conventional data function of exchange of Universal peripheral data exchange module in corresponding Java middlewares,
Wherein, each driver of platform, makes where the Universal peripheral data exchange module is packaged with the Java middlewares
The function that the function module of each driver after encapsulation is provided is corresponding with conventional data function of exchange respectively, the general number
Include the combination of following one or more functions according to function of exchange:Reading and writing and control;And it provides described general for calling
Data exchanging function, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Using the determining corresponding Universal peripheral data exchange interface of the conventional data function of exchange, to the Java middlewares
Send the call request for calling the conventional data function of exchange.
2. the method as described in claim 1, which is characterized in that be sent to the specified drive when being carried in the call request
During the business datum of dynamic program, before sending the call request to the Java middlewares, further include:
The general-purpose service data with common data structure is converted by business datum is carried in the call request, wherein, institute
State common data structure be by the Java middlewares based on platform in the corresponding data structure of each driver be packaged into
Unified common data structure.
3. the method as described in claim 1, which is characterized in that when the call result of the call request is described specified to receive
Driver be called the data fed back later when, to the Java middlewares send call request after, further include:
Receive the general-purpose service data with common data structure of the Java middlewares feedback;
By the general-purpose service data of reception, the business datum with the first data structure is converted to, wherein, the first data knot
Structure is the corresponding data structure of the specified driver;
Transformed business datum is fed back into the application program.
4. such as claim 1-3 any one of them methods, which is characterized in that the calling instruction that the application program is sent
In, the mark of the specified driver is carried, and the mark of the specified driver is carried on the calling and is asked
It asks and is sent to the Java middlewares.
A kind of 5. drive load method based on Java middlewares, which is characterized in that including:
By the Universal peripheral data exchange interface in Java middlewares, receive and the Universal peripheral data exchange interface is corresponded to
Conventional data function of exchange call request, wherein, carried in the call request Universal peripheral data exchange module envelope
The mark of the specified driver of dress;
Each driver of platform where the Universal peripheral data exchange module is packaged with the Java middlewares, after making encapsulation
Each driver the function that is provided of function module it is corresponding with conventional data function of exchange respectively, the conventional data exchanges
Function includes the combination of following one or more functions:Reading and writing and control;And it provides that the conventional data is called to hand over
Change function, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
According to the mark of the specified driver, the provided function of loading is corresponding with the conventional data function of exchange,
The function module of the specified driver.
6. method as claimed in claim 5, which is characterized in that when carried in the call request of reception be sent to it is described
During the data of specified driver, in the work(for loading specified driver corresponding with the conventional data function of exchange, described
Before energy module, further include:
The general-purpose service data with common data structure carried in the call request is converted into the second data knot
The business datum of structure, wherein, second data structure is the corresponding data structure of the specified driver;
The common data structure be by the Java middlewares based on platform in the corresponding data structure of each driver
The unified common data structure being packaged into.
7. method as claimed in claim 5, which is characterized in that when the call result of the call request is to the transmission tune
When sending the specified driver with the caller of request and being loaded the business datum fed back later, loading with it is described general
After the function module of the corresponding specified driver of data exchanging function, further include:
The function module is loaded to the business datum fed back later, is converted to the general service number with common data structure
According to;
Transformed general-purpose service data is fed back to the caller for sending the call request.
8. a kind of conversion equipment, which is characterized in that including:
Receiving module, for receiving the calling instruction of the specified driver of the calling of application program transmission;
Determining module calls the specified driving journey called indicated in instruction for what is received according to the receiving module
The function module of sequence determines Universal peripheral data exchange mould in the corresponding Java middlewares of function that the function module is provided
The conventional data function of exchange of block,
Wherein, each driver of platform, makes where the Universal peripheral data exchange module is packaged with the Java middlewares
The function that the function module of each driver after encapsulation is provided is corresponding with conventional data function of exchange respectively, the general number
Include the combination of following one or more functions according to function of exchange:Reading and writing and control;And it provides described general for calling
Data exchanging function, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Calling module, for the corresponding Universal peripheral data of the conventional data function of exchange determined using the determining module
Fabric Interface sends the call request for calling the conventional data function of exchange to the Java middlewares.
9. conversion equipment as claimed in claim 8, which is characterized in that further include:First modular converter;
First modular converter is sent to the specified drive for working as to carry in the call request of the calling module transmission
During the business datum of dynamic program, before sending the call request to the Java middlewares, it will be carried in the call request
Business datum is converted into the general-purpose service data with common data structure, wherein, the common data structure is by described in
Java middlewares based on platform in the unified common data structure that is packaged into of the corresponding data structure of each driver.
10. conversion equipment as claimed in claim 8, which is characterized in that further include:Second modular converter and feedback module;
The receiving module is additionally operable to be called it to receive the specified driver when the call result of the call request
During the data fed back afterwards, after call request is sent to the Java middlewares, the tool of the Java middlewares feedback is received
There is the general-purpose service data of common data structure;
Second modular converter for the general-purpose service data for receiving the receiving module, is converted to the first data
The business datum of structure, wherein, first data structure is the corresponding data structure of the specified driver;
The feedback module, for the transformed business datum of the second modular converter to be fed back to the application program.
11. a kind of Java middlewares, which is characterized in that including:
Universal peripheral data exchange module for being packaged with each driver of Java middlewares place platform, makes encapsulation
The function that the function module of each driver afterwards is provided is corresponding with conventional data function of exchange respectively, and the conventional data is handed over
Change the combination that function includes following one or more functions:Reading and writing and control;And it provides to call the conventional data
Function of exchange, corresponding with conventional data function of exchange Universal peripheral data exchange interface;
Receiving module for the Universal peripheral data exchange interface provided by the Universal peripheral data exchange module, receives
Call request to the corresponding conventional data function of exchange of the Universal peripheral data exchange interface, wherein, the call request
In carry Universal peripheral data exchange module encapsulation specified driver mark;
Load-on module, for the mark according to the specified driver, the provided function of loading is handed over the conventional data
Change the function module of corresponding, the described specified driver of function.
12. Java middlewares as claimed in claim 11, which is characterized in that further include:First modular converter;
First modular converter is sent to the specified driver for working as to carry in the call request received
During data, before the function module for loading specified driver corresponding with the conventional data function of exchange, described, by institute
It states the general-purpose service data with common data structure carried in call request and is converted into the business with the second data structure
Data, wherein, second data structure is the corresponding data structure of the specified driver;The common data structure is
By the Java middlewares based on platform in the unified conventional data that is packaged into of the corresponding data structure of each driver
Structure.
13. Java middlewares as claimed in claim 11, which is characterized in that further include:Second modular converter and feedback module;
Second modular converter is to the caller for sending the call request for working as the call result of the call request
When sending the specified driver and being loaded the business datum fed back later, in loading and the conventional data function of exchange pair
After the function module of the specified driver answered, the function module is loaded to the business datum fed back later, is turned
It is changed to the general-purpose service data with common data structure;
The feedback module sends the calling for the transformed general-purpose service data of the second modular converter to be fed back to
The caller of request.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410121126.4A CN104951323B (en) | 2014-03-27 | 2014-03-27 | Java middlewares and its driving calling, loading method and conversion equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410121126.4A CN104951323B (en) | 2014-03-27 | 2014-03-27 | Java middlewares and its driving calling, loading method and conversion equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104951323A CN104951323A (en) | 2015-09-30 |
CN104951323B true CN104951323B (en) | 2018-06-19 |
Family
ID=54165994
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410121126.4A Active CN104951323B (en) | 2014-03-27 | 2014-03-27 | Java middlewares and its driving calling, loading method and conversion equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104951323B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020807A (en) * | 2016-05-13 | 2016-10-12 | 上海井蛙科技有限公司 | Driver calling method and system |
CN109542964B (en) * | 2018-11-06 | 2021-02-19 | 用友网络科技股份有限公司 | Data calling method and data calling system |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1427361A (en) * | 2001-12-17 | 2003-07-02 | 北京中视联联合软件有限公司 | Method of driving bottom equipment based on customer/service apparatus structure |
CN1855034A (en) * | 2005-04-28 | 2006-11-01 | 上海贝尔阿尔卡特股份有限公司 | DOHM software interface irrelevant with apparatus object |
CN101593127A (en) * | 2008-05-27 | 2009-12-02 | 商埃曲网络软件(上海)有限公司 | A kind of cross-platform Jave virtual machine of Digital Television middleware system |
CN101710935A (en) * | 2009-12-02 | 2010-05-19 | 北京视博数字电视科技有限公司 | Middleware device of set-top box, cross-platform interface method and set-top box |
CN103051525A (en) * | 2011-10-14 | 2013-04-17 | 海尔集团公司 | Gateway service middleware system and method as well as device and system comprising gateway service middleware system |
CN103631645A (en) * | 2013-11-27 | 2014-03-12 | 中山大学深圳研究院 | Digital family middleware system based on digital medical treatment |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7313708B2 (en) * | 2004-04-28 | 2007-12-25 | Microsoft Corporation | Interlocked plug and play with power management for operating systems |
US20070198996A1 (en) * | 2006-02-09 | 2007-08-23 | Ziep Software Inc. | System and method for driving peripheral devices |
-
2014
- 2014-03-27 CN CN201410121126.4A patent/CN104951323B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1427361A (en) * | 2001-12-17 | 2003-07-02 | 北京中视联联合软件有限公司 | Method of driving bottom equipment based on customer/service apparatus structure |
CN1855034A (en) * | 2005-04-28 | 2006-11-01 | 上海贝尔阿尔卡特股份有限公司 | DOHM software interface irrelevant with apparatus object |
CN101593127A (en) * | 2008-05-27 | 2009-12-02 | 商埃曲网络软件(上海)有限公司 | A kind of cross-platform Jave virtual machine of Digital Television middleware system |
CN101710935A (en) * | 2009-12-02 | 2010-05-19 | 北京视博数字电视科技有限公司 | Middleware device of set-top box, cross-platform interface method and set-top box |
CN103051525A (en) * | 2011-10-14 | 2013-04-17 | 海尔集团公司 | Gateway service middleware system and method as well as device and system comprising gateway service middleware system |
CN103631645A (en) * | 2013-11-27 | 2014-03-12 | 中山大学深圳研究院 | Digital family middleware system based on digital medical treatment |
Also Published As
Publication number | Publication date |
---|---|
CN104951323A (en) | 2015-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1445693B1 (en) | System and method for building and configuring cross-platform applications | |
US7810105B2 (en) | Method and apparatus for running different types of applications on a wireless mobile device | |
US8589522B2 (en) | Incrementally updatable system software infrastructure for sensor networks | |
CA2768752C (en) | Terminal device of non-android platform for executing android applications, and computer readable recording medium for storing program of executing android applications on non-android platform | |
US20110010613A1 (en) | System and method for building mixed mode execution environment for component applications | |
CN114077462A (en) | Method, device, equipment and medium for calling Android HIDL interface by software operating system | |
EP4002121A1 (en) | Middleware interface and middleware interface generator | |
KR101856486B1 (en) | Method for bi-direction calling between open system and mainframe system | |
JP4943650B2 (en) | System for multimedia rendering on portable devices | |
US20160198018A1 (en) | Mobile device for executing radio application | |
Hernandez et al. | Analysis for the design of open applications on mobile devices | |
CN104951323B (en) | Java middlewares and its driving calling, loading method and conversion equipment | |
De Pascale et al. | The haptik library | |
US20190089386A1 (en) | Method and terminal device for executing radio application | |
CN101339508B (en) | Java2 miniature edition application operation method and device | |
US20040157593A1 (en) | Modularization for J2ME platform implementation | |
CN109343970B (en) | Application program-based operation method and device, electronic equipment and computer medium | |
US7580703B1 (en) | Provisioning to CDC devices | |
CN111324395B (en) | Calling method, device and computer readable storage medium | |
CN107357603A (en) | A kind of method for loading software, equipment and system | |
CN109445960B (en) | Application routing method, device and storage medium | |
JP2006277204A (en) | Portable communication terminal device | |
CN109032576A (en) | A kind of cross-platform generation method and device based on configuration | |
CN114860401A (en) | Heterogeneous cloud desktop scheduling system, method, service system, device and medium | |
CN101582040B (en) | Application program loading system and loading method based on ARM system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |