JP2007219857A - Api interface management program - Google Patents

Api interface management program Download PDF

Info

Publication number
JP2007219857A
JP2007219857A JP2006039895A JP2006039895A JP2007219857A JP 2007219857 A JP2007219857 A JP 2007219857A JP 2006039895 A JP2006039895 A JP 2006039895A JP 2006039895 A JP2006039895 A JP 2006039895A JP 2007219857 A JP2007219857 A JP 2007219857A
Authority
JP
Japan
Prior art keywords
api
parameter
program
parameters
command
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
Application number
JP2006039895A
Other languages
Japanese (ja)
Inventor
Yoshinori Hiyori
美憲 日和
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Broad Solution and Consulting Inc
Original Assignee
Fujitsu Broad Solution and Consulting Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujitsu Broad Solution and Consulting Inc filed Critical Fujitsu Broad Solution and Consulting Inc
Priority to JP2006039895A priority Critical patent/JP2007219857A/en
Publication of JP2007219857A publication Critical patent/JP2007219857A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To provide an API interface management program which calls an API function after an input parameter specified by an application program is built up as an execution parameter according to the latest agreement of an API. <P>SOLUTION: An application notifies an IF management program 17 of a command and input parameter corresponding to a requested execution according to the designated agreement. An IF management table 18 defines an API name corresponding to each command and the input parameter of the command respectively corresponds to what number of of a parameter among the execution parameters of respective API. The IF management program 17 reads out the API name and order information corresponding to the command notified from the application by comparing the IF management table 18, and creates an execution parameter by sorting the input parameter notified from the application in turn, and specifies the execution parameter by calling the API indicated by the API name. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、アプリケーションプログラムとAPI(Application Programming Interface)との間において、APIのインタフェースが必要とする実行パラメータを構築するためのAPIインタフェース管理プログラムに、関する。   The present invention relates to an API interface management program for constructing an execution parameter required by an API interface between an application program and an API (Application Programming Interface).

APIは、OS(Operating System)やミドルウェアがアプリケーションプログラム向けに提供している機能を利用するための命令や関数の集合であり、アプリケーションプログラムは、あるAPIの機能を利用する場合には、そのAPIの規約に従ったパラメータ(引数)を指定してそのAPIの関数(以下、「API関数」という)を呼び出すことにより、その機能を実現する処理をOS又はミドルウェアに依頼することができる。   An API is a set of instructions and functions for using functions provided by OS (Operating System) and middleware for application programs. When an application program uses functions of a certain API, the API is used. By specifying a parameter (argument) according to the above-mentioned convention and calling a function of the API (hereinafter referred to as “API function”), a process for realizing the function can be requested to the OS or middleware.

そのため、アプリケーションプログラムのソースにおけるAPI参照箇所(参照モジュール)には、そのAPI関数の名称(API名)及び指定を要するパラメータが、以下のように、記述されている(但し、option1,option2は、夫々、当該API名が示すAPI関数が必要とするパラメータである。)。
API名(option1,option2)
Therefore, the API reference location (reference module) in the source of the application program describes the name of the API function (API name) and parameters that need to be specified as follows (however, option1 and option2 are Each is a parameter required by the API function indicated by the API name.)
API name (option1, option2)

APIのインタフェースは、OSやミドルウェアのようなAPIの実装プログラムがバージョンアップされるに伴って、変更されることがある。例えば、あるAPI関数に指定可能なパラメータの数が2個から3個に増える場合がある。その場合には、アプリケーションが指定する各パラメータが、夫々、変更後における何番目のパラメータであるかが分かるようになってなければならないので、アプリケーションプログラムのソースにおける当該API関数についてのすべての参照モジュールを、書き換えなければならない。例えば、先の例において、指定可能な新たなパラメータが3番目のパラメータとして追加された場合には、その3番目のパラメータとして指定する意義のある具体値があれば、その具体値を3番目のパラメータとして追記する必要があるし、3番目のパラメータとして指定する意義のある具体値がないのであれば、NUL値を3番目のパラメータとして指定する(ないし、3番目のパラメータとして何ら具体値を指定しないことを明示する)必要がある。   The API interface may be changed as an API implementation program such as an OS or middleware is upgraded. For example, the number of parameters that can be specified for a certain API function may increase from two to three. In that case, since each parameter specified by the application must be able to know the number of the parameter after the change, all the reference modules for the API function in the source of the application program. Must be rewritten. For example, in the previous example, when a new parameter that can be specified is added as the third parameter, if there is a specific value that is meaningful to be specified as the third parameter, the specific value is set to the third parameter. If there is no specific value that needs to be added as a parameter and there is no meaningful value to specify as the third parameter, specify the NUL value as the third parameter (or specify any specific value as the third parameter) It is necessary to clearly indicate that it is not.

このような参照モジュールの書き換えは、インタフェースが変更となった全てのAPI関数について、これを利用する全てのアプリケーションにおける全ての参照モジュールにおいてなされなければならない。しかも、APIの実装の開発業者と、アプリケーションの開発業者とが異なる場合には、他社に対して参照モジュールの書き換えを要求しなければならないので、事実上の困難が伴っていた。   Such rewriting of the reference module must be performed in all reference modules in all applications that use the API function whose interface has been changed. In addition, when the developer of the API implementation is different from the developer of the application, rewriting of the reference module must be requested from another company, which is accompanied by a practical difficulty.

また、従来、アプリケーションがAPI関数を呼び出すために指定する各パラメータが、当該API関数についての規約に従っているかをチェックするためには、API関数毎にチェックロジックを作成しておかなければならなかったので、APIのインタフェースの変更に伴って、これらのチェックロジックも、個別に変更しなければならなかった。   Conventionally, in order to check whether each parameter specified for an application to call an API function conforms to the conventions for the API function, a check logic has to be created for each API function. As the API interface is changed, these check logics must be changed individually.

本発明は、このような問題に鑑みてなされたものであり、その課題は、アプリケーションプログラムとAPIとの間において、アプリケーションプログラムが指定した入力パラメータを、APIの最新の規約に従った実行パラメータとして構築した上で、API関数を呼び出すことができるAPIインタフェース管理プログラムを、提供することである。   The present invention has been made in view of such a problem, and the problem is that an input parameter specified by the application program between the application program and the API is set as an execution parameter in accordance with the latest API convention. It is to provide an API interface management program that can call an API function after being constructed.

このような課題を解決するために案出された本発明によるAPIインタフェース管理プログラムは、APIを実装したAPI実装プログラムに従った処理,及び、このAPI実装プログラムに対して所定の処理を要求するために、所定の規約に従って、求める処理に対応したコマンド及び入力パラメータとしての複数のパラメータを通知するアプリケーションプログラムに従った処理を、夫々実行するコンピュータに読み込まれて実行される。そして、このコンピュータに対して、個々の前記コマンド毎に、そのコマンドに対応した処理を前記API実装プログラムに実行させるAPI関数を呼び出すためのAPI名,そのコマンドに応じた前記規約が定める入力パラメータを構成する各パラメータが夫々前記API関数に指定可能な実行パラメータ中の何番目のパラメータに相当するかを定義する順番情報が記述されているテーブルを、記憶手段に記憶させ、前記アプリケーションプログラムにより生成された前記コマンド及び入力パラメータを取り込ませ、前記テーブルから、前記コマンドに対応したAPI名及び順番情報を読み出させ、前記入力パラメータ中の各パラメータを、前記順番情報が定義する順番の位置に並べ替えさせることにより実行パラメータを作成させ、前記API名が示すAPI関数を呼び出させて、前記実行パラメータを指定することにより、前記コマンドに対応した処理を前記API実装プログラムに実行させることを、特徴とする。   The API interface management program according to the present invention devised to solve such a problem is for processing according to an API implementation program that implements an API, and for requesting predetermined processing to the API implementation program. In addition, in accordance with a predetermined rule, a process corresponding to an application program for notifying a command corresponding to a required process and a plurality of parameters as input parameters is read and executed by a computer that executes the process. Then, for each of the commands, an API name for calling an API function that causes the API implementation program to execute processing corresponding to the command, and an input parameter defined by the convention according to the command are input to the computer. A table in which order information that defines the number of parameters among the execution parameters that can be specified in the API function is stored in the storage means, and is generated by the application program. The command and input parameters are taken in, the API name and order information corresponding to the commands are read from the table, and the parameters in the input parameters are rearranged in the order positions defined by the order information. To create an execution parameter, and By calling the API function PI name indicates, by designating the execution parameter, that for executing the processing corresponding to the command to the API implementation program, characterized.

このように構成されると、APIインタフェースプログラムは、アプリケーションプログラムがコマンド及び入力パラメータを通知すると、これらコマンド及び入力パラメータを取り込み、このコマンドに対応したAPI名及び順番情報を記憶装置上のテーブルから読み出す。そして、入力パラメータ中の各パラメータを、順番情報が示す位置に並べ替えることにより、実行パラメータを作成する。以上の後に、APIインタフェースプログラムは、API名が示すAPI関数を呼び出し、実行パラメータを指定することにより、上記コマンドに対応した処理をAPI実装プログラムに実行させる。   With this configuration, when the application program notifies the command and the input parameter, the API interface program takes in the command and the input parameter, and reads out the API name and order information corresponding to the command from the table on the storage device. . Then, the execution parameters are created by rearranging the parameters in the input parameters at the positions indicated by the order information. After the above, the API interface program calls the API function indicated by the API name and designates an execution parameter, thereby causing the API implementation program to execute processing corresponding to the command.

本発明において、テーブルには、更に、個々の前記コマンド毎に、そのコマンドに対応した処理を前記API実装プログラムに実行させるAPI関数に指定可能な実行パラメータ中の各パラメータについて、その満たすべき条件が記述されていても良い。その場合、APIインタフェース管理プログラムは、実行パラメータの作成に際して、入力パラメータ中の各パラメータが、夫々に対応する前記実行パラメータ中の各パラメータについて前記テーブル中に記述された条件を満たすか否かをチェックさせ、全てのパラメータが条件を満たす場合にのみ、実行パラメータを作成すればよい。処理の順番を変えて、実行パラメータを作成してから、この実行パラメータ中の各パラメータが、夫々の条件を満たすか否かをチェックしても良い。   In the present invention, the table further includes a condition to be satisfied for each parameter in the execution parameters that can be specified for the API function that causes the API implementation program to execute processing corresponding to the command for each of the commands. It may be described. In that case, when creating an execution parameter, the API interface management program checks whether each parameter in the input parameter satisfies the condition described in the table for each parameter in the corresponding execution parameter. The execution parameters need only be created when all parameters satisfy the conditions. After changing the order of processing and creating execution parameters, it may be checked whether or not each parameter in the execution parameters satisfies each condition.

以上のように構成された本発明によると、アプリケーションプログラムとAPIとの間において、アプリケーションプログラムが指定した入力パラメータを、APIの最新の規約に従った実行パラメータとして構築した上で、API関数を呼び出すことができる。   According to the present invention configured as described above, an input function designated by an application program is constructed as an execution parameter in accordance with the latest API convention between the application program and the API, and then an API function is called. be able to.

以下、本発明の実施の形態を、図面を参照して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<システム構成>
図1は、本発明によるAPIインタフェース管理プログラムの実施の形態であるIF管理プログラム17及びIF管理テーブル18がインストールされているコンピュータ(サーバマシン1)及び端末2が、ネットワークNを通じて通信可能に接続されてなるコンピュータシステムを示す、ブロック図である。
<System configuration>
FIG. 1 shows a computer (server machine 1) in which an IF management program 17 and an IF management table 18, which are embodiments of an API interface management program according to the present invention, and a terminal 2 are connected to be communicable through a network N. 1 is a block diagram showing a computer system.

サーバマシン1は、クラスサーバ,ウェブサーバとしての業務を実行するコンピュータであり、かかるサーバとして通常有するハードウェア構成及びソフトウェア構成を、備えている。概略的に説明すると、このサーバマシン1の内部回路は、プログラムに従った処理を実行する処理装置であるCPU(Central Processing Unit)10と、バスBを通じて、このCPU10に接続されているハードディスク11,RAM12,通信アダプタ19及びROM20を、備えている。   The server machine 1 is a computer that executes business as a class server and a web server, and has a hardware configuration and a software configuration that are normally included as such a server. Briefly described, the internal circuit of the server machine 1 includes a CPU (Central Processing Unit) 10 which is a processing device for executing processing according to a program, and a hard disk 11 connected to the CPU 10 through a bus B, A RAM 12, a communication adapter 19, and a ROM 20 are provided.

RAM11は、CPU10が処理を実行するに際してプログラムやデータをハードディスク12やROM20から読み込んで(キャッシュして)データ処理を行うる作業領域が展開される主記憶装置である。   The RAM 11 is a main storage device in which a work area in which a program and data are read (cached) from the hard disk 12 and the ROM 20 to perform data processing when the CPU 10 executes processing is expanded.

ハードディスクに格納されて上述したようにRAM12に読み出されるプログラムには、上述したIF管理プログラム17の他、WWWサーバプログラム13,業務アプリケーションプログラム14,OS・ミドルウェア等のプログラム16が、含まれている。また、ハードディスクに格納されて上述したようにRAM12に読み出されるデータ(ライブラリ)には、OS・ミドルウェア等のプログラム16に実装されたAPI15が、含まれている。即ち、OS・ミドルウェア等のプログラム16は、APIの実装プログラムである。また、ROM20に格納されて上述したようにRAM12に読み出されるデータには、上述したIF管理テーブル18が、含まれている。   The programs stored in the hard disk and read out to the RAM 12 as described above include, in addition to the IF management program 17 described above, a WWW server program 13, a business application program 14, and a program 16 such as an OS / middleware. Further, the data (library) stored in the hard disk and read out to the RAM 12 as described above includes the API 15 implemented in the program 16 such as OS / middleware. That is, the program 16 such as OS / middleware is an API implementation program. Further, the data stored in the ROM 20 and read out to the RAM 12 as described above includes the above-described IF management table 18.

WWWサーバプログラム13は、端末2上で実行されているアプリケーションプログラムであるクライアントプログラム21(を実行している端末2の図示せぬプロセッサ)と通信を行う。そして、このクライアントプログラム21から各種リクエストを受信し、リクエストにOS・ミドルウェア等のプログラム16の機能を利用するためのAPI15の呼び出しが含まれている場合には、当該API15の呼び出しをIF管理プログラム17に転送し、最終的に、そのリクエストに対するレスポンスをクライアントプログラム16に応答する。   The WWW server program 13 communicates with a client program 21 which is an application program executed on the terminal 2 (a processor (not shown in the terminal 2 executing the program)). If various requests are received from the client program 21 and the API 15 call for using the function of the program 16 such as OS / middleware is included in the request, the API 15 call is called the IF management program 17. Finally, a response to the request is returned to the client program 16.

業務アプリケーションプログラム14は、各種業務を実行するためのアプリケーションプログラムであり、OS・ミドルウェア等のプログラム16の機能を利用する必要がある場合には、当該API15の呼び出しをIF管理プログラム17に依頼する。   The business application program 14 is an application program for executing various business operations, and requests the IF management program 17 to call the API 15 when it is necessary to use the function of the program 16 such as OS / middleware.

上述した各種プログラムのうち、クライアントプログラム21及び業務アプリケーションプログラム14が、OS・ミドルウェア等の等のプログラム16を開発した業者とは異なる業者によって開発され、OS・ミドルウェア等の等のプログラム16の機能を利用するアプリケーションプログラムである。これらアプリケーションプログラム21,14のソースには、IF管理プログラム17に対してAPI15の呼び出しを依頼するためのAPIの参照モジュールが含まる。その参照モジュールの記述形式は、例えば、以下の通りである。   Among the various programs described above, the client program 21 and the business application program 14 are developed by a company different from the company that developed the program 16 such as the OS and middleware, and the functions of the program 16 such as the OS and middleware are provided. Application program to use. The source of these application programs 21 and 14 includes an API reference module for requesting the IF management program 17 to call the API 15. The description format of the reference module is, for example, as follows.

ohpa_exec(入力パラメータ)
このうち、「ohpa_exec」は、IF管理プログラム17を呼び出すための関数である。また、呼び出されたIF管理プログラム17に渡される入力パラメータの記述形式は、例えば、以下の通りである。
ohpa_exec (input parameter)
Among these, “ohpa_exec” is a function for calling the IF management program 17. Also, the description format of the input parameter passed to the called IF management program 17 is, for example, as follows.

コマンド名(項目1,項目2,項目3,・・・・)
このうち、「コマンド名」は、IF管理プログラム17に依頼される処理の内容を指定する記述である。即ち、IF管理プログラム17に依頼される処理は、特定のAPI関数について、当該アプリケーション開発時(若しくはバージョンアップ時)における規約により指定可能であったパラメータの数,内容及び順序を、最新の規約により指定可能となったパラメータの数,内容及び順序に、整合させることである。よって、同じAPI関数に関する処理であっても、アプリケーションプログラム21,14の開発時におけるAPIの規約に依って、IF管理プログラム17に依頼すべき処理の内容,即ち、コマンド名が、異なることになる。また、「項目1」,「項目2」,「項目3」,・・・には、基本的には、当該アプリケーションプログラム21,14の開発時(若しくはバージョンアップ時)におけるAPI15の規約に従った数,内容及び順序で、複数のパラメータが夫々記述される。但し、API15の仕様が公表されていない場合には、当初より、IF管理プログラム17の利用を前提として、APIの規約とは異なる規約に従って、各項目へのパラメータの記述が求められている場合もある。
Command name (Item 1, Item 2, Item 3, ...)
Among these, “command name” is a description for designating the content of processing requested to the IF management program 17. In other words, the processing requested to the IF management program 17 is the number of parameters, contents, and order that can be specified according to the rules at the time of application development (or at the time of version upgrade) for a specific API function according to the latest rules. Match the number, contents, and order of parameters that can be specified. Therefore, even in the process related to the same API function, the contents of the process to be requested to the IF management program 17, that is, the command name, differ depending on the API convention when the application programs 21 and 14 are developed. . In addition, “item 1”, “item 2”, “item 3”,... Basically follow the conventions of API 15 at the time of development (or version upgrade) of the application programs 21 and 14. A plurality of parameters are described in number, content, and order. However, if the API 15 specifications have not been published, parameter descriptions for each item may be requested from the beginning in accordance with a convention different from the API convention on the assumption that the IF management program 17 is used. is there.

以上により、CPU10は、API15を実装したAPI実装プログラム16に従った処理,及び、このAPI実装プログラム16に対して所定の処理を要求するために、所定の規約に従って、求める処理に対応したコマンド及び入力パラメータとしての複数のパラメータを生成するアプリケーションプログラム21,14に従った処理を、夫々実行するコンピュータに、相当する。   As described above, in order to request the API implementation program 16 according to the API implementation program 16 that implements the API 15 and the API implementation program 16 to perform the predetermined process, the CPU 10 This corresponds to a computer that executes processes according to application programs 21 and 14 that generate a plurality of parameters as input parameters.

IF管理テーブル18は、アプリケーションプログラム21,14によって呼び出されたIF管理プログラム17によって参照されるテーブルであり、各コマンド名毎に、そのコマンドに対応したAPI関数のAPI名と、入力パラメータにおける各項目のパラメータとAPI関数に対して指定すべきパラメータ(実行パラメータ)との相関と、API関数に対して指定可能なパラメータの条件(チェック内容)とを定義したレコード(スタイルシート)が、登録されている。即ち、各スタイルシートは、そのスタイルシートに対応したコマンド名を定義する「コマンド名」欄,そのコマンド名に対応したAPI関数のAPI名(コマンドに対応した処理をAPI実装プログラムに実行させるAPI関数を呼び出すためのAPI名)を定義する「API名」欄,入力パラメータにおける各項目が実行パラメータにおける何番目のパラメータ(option)に相当するかを定義する「引数順番」欄,実行パラメータにおける1番目のパラメータ(option1)が満たすべき条件を定義する「option1のチェック内容」欄,実行パラメータにおける2番目のパラメータ(option2)が満たすべき条件を定義する「option2のチェック内容」欄,実行パラメータにおける3番目のパラメータ(option3)が満たすべき条件を定義する「option3のチェック内容」欄,・・・から、構成されている。なお、引数順序「3,2,1」とは、入力パラメータにおける項目1のパラメータを実行パラメータにおけるoption3とし、項目2のパラメータをoption2とし、項目3のパラメータをoption1とすべきことを、意味している(即ち、入力パラメータを構成する各パラメータが夫々前記API関数に指定可能な実行パラメータ中の何番目のパラメータに相当するかを定義する順番情報に相当する)。また、等式又は不等式により定義されている「〜チェック内容」は、そのパラメータが整数又はアドレス値であり、且つ、その等式又は不等式を満たすことを、条件としている。また、文字により定義されている「〜チェック内容」は、そのパラメータが、当該文字であることを条件としている。また、“−”は、そのoptionが新たに指定可能になったパラメータであって、それに該当する入力パラメータの項目がないことを示している。   The IF management table 18 is a table referred to by the IF management program 17 called by the application programs 21 and 14, and for each command name, the API name of the API function corresponding to the command and each item in the input parameter A record (style sheet) that defines the correlation between the parameters of the API and the parameters that should be specified for the API function (execution parameters) and the conditions of the parameters that can be specified for the API function (check contents) is registered Yes. That is, each style sheet has a “command name” field for defining a command name corresponding to the style sheet, an API name of an API function corresponding to the command name (an API function that causes the API implementation program to execute processing corresponding to the command) "API name" column that defines the API name for calling, "argument order" column that defines what parameter (option) in the execution parameter each item in the input parameter, the first in the execution parameter "Option1 check contents" field that defines the conditions that the parameter (option1) should satisfy, "option2 check contents" field that defines the conditions that the second parameter (option2) in the execution parameters must satisfy, and the third in the execution parameters Define the conditions to be satisfied by the parameter (option3) of “option3 Ekku content "column, from ..., are configured. The argument order “3, 2, 1” means that the parameter of item 1 in the input parameter should be option 3 in the execution parameter, the parameter of item 2 should be option 2, and the parameter of item 3 should be option 1. (That is, each parameter constituting the input parameter corresponds to order information that defines what number of parameters among the execution parameters that can be specified in the API function). In addition, “to check content” defined by an equation or an inequality is conditional on the parameter being an integer or an address value and satisfying the equation or inequality. In addition, “to check content” defined by a character is conditional on the parameter being the character. "-" Indicates that the option is a parameter that can be newly specified, and there is no corresponding input parameter item.

IF管理プログラム17は、アプリケーションプログラム21,14がohpa_execを実行することによって呼び出されると、図3のフローチャートに示す処理を実行する。即ち、先ず、最初のS1において、IF管理プログラム17は、項目分解処理を実行する。即ち、アプリケーションプログラム21,14から渡された入力パラメータを解析して、各要素毎に分解し、図4に示すように、コマンド名,空欄,空欄,項目1,項目2,項目3,・・・の順番に、並べる。   When the application program 21 or 14 is called by executing ohpa_exec, the IF management program 17 executes the processing shown in the flowchart of FIG. That is, first, in the first S1, the IF management program 17 executes an item disassembly process. That is, the input parameters passed from the application programs 21 and 14 are analyzed and decomposed for each element. As shown in FIG. 4, the command name, blank, blank, item 1, item 2, item 3,.・ Arrange in the order of.

次のS2では、IF管理プログラム17は、スタイルシート項目分解処理を実行する。即ち、IF管理プログラム17は、S1において解析した「コマンド名」に相当するスタイルシートをIF管理テーブル18から読み込んで、各欄毎に分解し、図5に示すように、コマンド名,API名,引数順番,引数順番において項目1に対応付けられたoptionのチェック内容,項目2に対応付けられたoptionのチェック内容,項目3に対応付けられたoptionのチェック内容,・・・の順に並べる。   In the next S2, the IF management program 17 executes style sheet item disassembly processing. That is, the IF management program 17 reads the style sheet corresponding to the “command name” analyzed in S1 from the IF management table 18, disassembles each column, and, as shown in FIG. 5, the command name, API name, In the argument order, the check contents of the option associated with the item 1 in the argument order, the check contents of the option associated with the item 2, the check contents of the option associated with the item 3, and so on.

次のS3では、IF管理プログラム17は、S1にて並べた入力パラメータの各要素と、S2にて並べたスタイルシートの各欄の内容とを対比させ、各項目のパラメータが、対応する位置に並べられているチェック内容を満たしているかどうかを、チェックする。例えば、引数順番が「3,2,1」と定義されている場合には、項目1のパラメータが「oprion3のチェック内容」を満たしているか、項目2のパラメータが「option2のチェック内容」を満たしているか、項目3のパラメータが「option1のチェック内容」を満たしているかを、チェックする。そして、何れかの項目のパラメータが対応する「〜チェック内容」を満たしていない場合には、IF管理プログラム17は、呼び出し元のアプリケーションに対して、エラーメッセージを応答する。これに対して、全項目のパラメータが夫々対応する「〜チェック内容」を満たしている場合には、IF管理プログラム17は、処理をS4へ進める。   In the next S3, the IF management program 17 compares each element of the input parameter arranged in S1 with the contents of each column of the style sheet arranged in S2, and the parameter of each item is set to the corresponding position. Check whether the check contents listed are satisfied. For example, when the argument order is defined as “3, 2, 1”, the item 1 parameter satisfies “oprion3 check content” or the item 2 parameter satisfies “option2 check content” And whether the parameter of item 3 satisfies “check contents of option 1”. If the parameter of any item does not satisfy the corresponding “to check content”, the IF management program 17 returns an error message to the calling application. On the other hand, if the parameters of all items satisfy the corresponding “˜check contents”, the IF management program 17 advances the process to S4.

次のS4では、IF管理プログラム17は、実行パラメータ作成処理を実行する。即ち、S2にて分解された要素中のAPI名,S1にて分解された各項目のパラメータに基づいて、実行パラメータを作成する。この際、IF管理プログラム17は、S2にて分解された要素中の引数順番に従って、各項目のパラメータを、夫々に対応するoptionの位置に並べ替える。   In the next S4, the IF management program 17 executes an execution parameter creation process. That is, an execution parameter is created based on the API name in the element decomposed in S2 and the parameters of each item decomposed in S1. At this time, the IF management program 17 rearranges the parameters of each item to the corresponding option positions in accordance with the argument order in the elements decomposed in S2.

例えば、今、入力パラメータが、
$xxx(1,64,128)
であったならば、それに対応するスタイルシートは図2に示すIF管理テーブル18の先頭行の通りであるので、引数順番は「3,2,1」であるから、実行パラメータは、
opm_yyy(128,64,1)
となる。
For example, now the input parameter is
$ xxx (1,64,128)
If so, since the corresponding style sheet is as shown in the top row of the IF management table 18 shown in FIG. 2, the argument order is “3, 2, 1”.
opm_yyy (128, 64, 1)
It becomes.

また、入力パラメータが、
$ccc(18,1)
であったならば、それに対応するスタイルシートは図2に示すIF管理テーブル18の4行目の通りであるので、引数順番は「2,3」であるから、実行パラメータは、
opm_ccc(,18,1)
となる。この場合、option1に対応する項目がないので、option1の位置にはNUL値が設定されることになる。
The input parameter is
$ ccc (18, 1)
If so, since the corresponding style sheet is as the fourth line of the IF management table 18 shown in FIG. 2, the argument order is “2, 3”.
opm_ccc (, 18,1)
It becomes. In this case, since there is no item corresponding to option1, a NUL value is set at the position of option1.

次のS5では、IF管理プログラム17は、S4にて作成した実行パラメータをマクロ実行することにより、そのAPI名が示すAPI関数を呼び出して、option 1以下のパラメータを指定する。このように指定された各パラメータは、当該API関数の最新の規約を満たしていることが保証されているので、呼び出されたAPI関数が実行されることにより、OS・ミドルウェア等のプログラム16は、そのAPI関数に対応した処理を、各パラメータに基づいて実行し、その結果(戻り値)をIF管理プログラム17に応答する。この戻り値は、IF管理プログラム17から、呼び出し元のアプリケーションプログラムに応答される。   In the next S5, the IF management program 17 macro-executes the execution parameter created in S4, thereby calling an API function indicated by the API name and specifying a parameter of option 1 or less. Since each parameter specified in this way is guaranteed to satisfy the latest rules of the API function, the program 16 such as OS / middleware can be executed by executing the called API function. A process corresponding to the API function is executed based on each parameter, and the result (return value) is returned to the IF management program 17. This return value is returned from the IF management program 17 to the calling application program.

以上のように構成されるため、API15の実装であるOS・ミドルウェア等のプログラム16のバージョンアップ等に伴ってAPI15の規約が変更された場合には、当該プログラム16の開発業者は、新たなAPI15の規約に応じて、IF管理プログラム17によって作成される実行パラメータが新たなAPIの規約を満たすものになるように、IF管理テーブル18を書き換える。そして、書換後のIF管理テーブル18を、当該プログラム16のユーザに配布し、そのサーバマシン1のハードディスク11に上書きしてもらう。若しくは、自ら、サーバマシン1を操作して、書換後のIF管理テーブル18をハードディスク11に上書きする。その結果、アプリケーションプログラム21,14におけるAPIの参照モジュールを何等書き換えることなく、最新のAPI15を使用させることが可能となるのである。   Since the configuration of the API 15 is changed in accordance with the version upgrade of the program 16 such as OS / middleware which is the implementation of the API 15, the developer of the program 16 makes a new API 15 The IF management table 18 is rewritten so that the execution parameters created by the IF management program 17 satisfy the new API rules. Then, the rewritten IF management table 18 is distributed to the user of the program 16 and overwritten on the hard disk 11 of the server machine 1. Alternatively, the server machine 1 is operated by itself to overwrite the hard disk 11 with the rewritten IF management table 18. As a result, the latest API 15 can be used without rewriting the API reference module in the application programs 21 and 14 at all.

本発明の実施の形態であるサーバマシンの構成を示すブロック図The block diagram which shows the structure of the server machine which is embodiment of this invention IF管理テーブルのデータ構造を示す表Table showing the data structure of the IF management table IF管理プログラムによる処理内容を示すフローチャートFlow chart showing contents of processing by IF management program 項目分解処理の結果例を示す図The figure which shows the result example of item disassembly processing スタイルシート項目分解処理の結果例を示す図The figure which shows the example of the result of style sheet item decomposition processing

符号の説明Explanation of symbols

1 サーバマシン
10 CPU
11 ハードディスク
12 RAM
14 業務アプリケーション
15 API
16 OS・ミドルウェア等のプログラム
17 IF管理プログラム
18 IF管理テーブル
20 ROM
21 クライアントプログラム
1 Server machine 10 CPU
11 Hard disk 12 RAM
14 Business application 15 API
16 Programs such as OS and middleware 17 IF management program 18 IF management table 20 ROM
21 Client program

Claims (2)

APIを実装したAPI実装プログラムに従った処理,及び、このAPI実装プログラムに対して所定の処理を要求するために、所定の規約に従って、求める処理に対応したコマンド及び入力パラメータとしての複数のパラメータを通知するアプリケーションプログラムに従った処理を、夫々実行するコンピュータに対して、
個々の前記コマンド毎に、そのコマンドに対応した処理を前記API実装プログラムに実行させるAPI関数を呼び出すためのAPI名,そのコマンドに応じた前記規約が定める入力パラメータを構成する各パラメータが夫々前記API関数に指定可能な実行パラメータ中の何番目のパラメータに相当するかを定義する順番情報が記述されているテーブルを、記憶手段に記憶させ、
前記アプリケーションプログラムにより生成された前記コマンド及び入力パラメータを取り込ませ、
前記テーブルから、前記コマンドに対応したAPI名及び順番情報を読み出させ、前記入力パラメータ中の各パラメータを、前記順番情報が定義する順番の位置に並べ替えさせることにより実行パラメータを作成させ、
前記API名が示すAPI関数を呼び出させて、前記実行パラメータを指定することにより、前記コマンドに対応した処理を前記API実装プログラムに実行させる
ことを特徴とするAPIインタフェース管理プログラム。
In order to request a process according to an API implementation program that implements an API and a predetermined process for the API implementation program, a command corresponding to the requested process and a plurality of parameters as input parameters are set according to a predetermined rule. For each computer that executes processing according to the application program to be notified,
For each of the commands, an API name for calling an API function that causes the API implementation program to execute processing corresponding to the command, and each parameter constituting an input parameter defined by the convention according to the command is the API. Store in the storage means a table in which the order information that defines what number of parameters among the execution parameters that can be specified for the function is described,
Capture the command and input parameters generated by the application program,
The API name and order information corresponding to the command are read from the table, and the execution parameters are created by rearranging the parameters in the input parameters in the order positions defined by the order information,
An API interface management program that causes an API implementation program to execute processing corresponding to the command by calling an API function indicated by the API name and specifying the execution parameter.
前記テーブルには、更に、個々の前記コマンド毎に、そのコマンドに対応した処理を前記API実装プログラムに実行させるAPI関数に指定可能な実行パラメータ中の各パラメータについて、その満たすべき条件が記述されており、
前記コンピュータに対して、前記実行パラメータを作成させるのに際して、前記入力パラメータ中の各パラメータが、夫々に対応する前記実行パラメータ中の各パラメータについて前記テーブル中に記述された条件を満たすか否かをチェックさせ、全てのパラメータが条件を満たす場合にのみ、前記実行パラメータを作成させる
ことを特徴とする請求項1記載のAPIインタフェース管理プログラム。
The table further describes the condition to be satisfied for each parameter in the execution parameters that can be specified in the API function that causes the API implementation program to execute processing corresponding to the command for each of the commands. And
Whether to cause the computer to create the execution parameter, each parameter in the input parameter satisfies the condition described in the table for each parameter in the corresponding execution parameter. 2. The API interface management program according to claim 1, wherein the execution parameter is created only when all parameters satisfy the conditions.
JP2006039895A 2006-02-16 2006-02-16 Api interface management program Pending JP2007219857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006039895A JP2007219857A (en) 2006-02-16 2006-02-16 Api interface management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006039895A JP2007219857A (en) 2006-02-16 2006-02-16 Api interface management program

Publications (1)

Publication Number Publication Date
JP2007219857A true JP2007219857A (en) 2007-08-30

Family

ID=38497087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006039895A Pending JP2007219857A (en) 2006-02-16 2006-02-16 Api interface management program

Country Status (1)

Country Link
JP (1) JP2007219857A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09128379A (en) * 1995-11-06 1997-05-16 Hitachi Ltd Information processing method
JPH09160847A (en) * 1995-12-08 1997-06-20 Hitachi Ltd Client server-type distribution processing system
JP2004246434A (en) * 2003-02-12 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Api temporary argument inspection method, api temporary argument inspection method, api temporary argument inspection program and storage medium recording the program
JP2004246789A (en) * 2003-02-17 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Program function expansion system, program function expansion method, program function expansion program and record medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09128379A (en) * 1995-11-06 1997-05-16 Hitachi Ltd Information processing method
JPH09160847A (en) * 1995-12-08 1997-06-20 Hitachi Ltd Client server-type distribution processing system
JP2004246434A (en) * 2003-02-12 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Api temporary argument inspection method, api temporary argument inspection method, api temporary argument inspection program and storage medium recording the program
JP2004246789A (en) * 2003-02-17 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Program function expansion system, program function expansion method, program function expansion program and record medium

Similar Documents

Publication Publication Date Title
US10949381B2 (en) Reusable transformation mechanism to allow mappings between incompatible data types
US8856805B2 (en) Virtual channel for embedded process communication
US8296721B2 (en) Template-based software development
CN108388622B (en) API interface dynamic generation method and device, computer equipment and storage medium
US8850388B2 (en) Controlling application features
KR20120101706A (en) Managing objects using a client-server bridge
JP5209016B2 (en) WebAPI creation support apparatus and WebAPI creation support method
US8533230B2 (en) Expressing manageable resource topology graphs as dynamic stateful resources
CN104317591A (en) OSGi (open service gateway initiative)-based web interface frame system and web business processing method thereof
US11595299B2 (en) System and method of suppressing inbound payload to an integration flow of an orchestration based application integration
JP2013080275A (en) Setting control device, setting control method, and setting control program
US20190102477A1 (en) Novel metadata relationships in a configuration management database
US11595493B2 (en) System and method for namespace masking in an integration flow
JP4798395B2 (en) Resource automatic construction system, automatic construction method, and management terminal therefor
US8539496B1 (en) Method and apparatus for configuring network systems implementing diverse platforms to perform business tasks
US20200409670A1 (en) Automatic software generation for computer systems
JP2008165342A (en) Source code creating method, device and program
US20190179932A1 (en) Tracking and reusing function results
US11531525B2 (en) System and method for packaging standalone application modules into re-usable application and infrastructure resources
JP2005108082A (en) Interface method for device driver
US11366648B2 (en) Compiling monoglot function compositions into a single entity
JP2007219857A (en) Api interface management program
US11017032B1 (en) Document recovery utilizing serialized data
JP6128259B2 (en) Information processing system and information processing method
JP2006268125A (en) Application server and its program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090130

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20090130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101012

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101019

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20101104

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20101104

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20110301