JP5458147B2 - Event notification method, program, and apparatus - Google Patents

Event notification method, program, and apparatus Download PDF

Info

Publication number
JP5458147B2
JP5458147B2 JP2012140851A JP2012140851A JP5458147B2 JP 5458147 B2 JP5458147 B2 JP 5458147B2 JP 2012140851 A JP2012140851 A JP 2012140851A JP 2012140851 A JP2012140851 A JP 2012140851A JP 5458147 B2 JP5458147 B2 JP 5458147B2
Authority
JP
Japan
Prior art keywords
bundle
event notification
event
listener
preferentially
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.)
Expired - Fee Related
Application number
JP2012140851A
Other languages
Japanese (ja)
Other versions
JP2014006641A (en
Inventor
重邦 近藤
育生 山崎
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012140851A priority Critical patent/JP5458147B2/en
Publication of JP2014006641A publication Critical patent/JP2014006641A/en
Application granted granted Critical
Publication of JP5458147B2 publication Critical patent/JP5458147B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Description

本発明は、OSGiバンドル(イベントリスナ)にイベント通知を行う技術に関する。   The present invention relates to a technique for notifying an OSGi bundle (event listener) of an event.

OSGi仕様に準拠したOSGiフレームワーク上では、バンドルと呼ばれるソフトウェアモジュールが動作する。バンドルは、INSTALLED、RESOLVE、STARTING、ACTIVE、STOPPING、UNINSTALLEDのステータスを持ち、そのステータスは、バンドルのインストール、起動、停止等のイベントによって変化する。   A software module called a bundle operates on the OSGi framework compliant with the OSGi specification. The bundle has a status of INSTALLED, RESOLVE, STARTING, ACTIVE, STOPPING, or UNINSTALLED, and the status changes depending on events such as installation, activation, and stop of the bundle.

イベント通知を受けたい各バンドルA,Bは、図6に示すように、(1)各イベントリスナa,bをOSGiフレームワークに各々登録しておくことにより、(2)他のバンドルYでステータス変更が生じた際に、(3)OSGiフレームワークの通知部により、当該ステータス変更に基づくイベント通知を個々のイベントリスナa,bを通じて各々受けることができる。   As shown in FIG. 6, the bundles A and B that want to receive event notifications are as follows: (1) By registering each event listener a and b in the OSGi framework, (2) Status in other bundles Y When a change occurs, (3) an event notification based on the status change can be received through the individual event listeners a and b by the notification unit of the OSGi framework.

ステータス変更が発生した際には、OSGiフレームワーク内に登録されている全てのイベントリスナに対してイベント通知がそれぞれ行われるが、その優先度はイベントリスナの種類によって異なっている。   When a status change occurs, event notification is performed for all event listeners registered in the OSGi framework, but the priority differs depending on the type of event listener.

非特許文献1によれば、ステータス変更を検知するイベントリスナとして、SynchronousBundleListenerとBundleListenerの2種類が用意されており、最初に、SynchronousBundleListenerのイベントリスナが呼び出され(イベント通知の同期的実行)、続いて、BundleListenerのイベントリスナが呼び出される。図6の場合には、イベントリスナbよりも先にイベントリスナaが呼び出され、バンドルBよりも前にバンドルAにバンドルYのイベントが通知される。   According to Non-Patent Document 1, there are two types of event listeners that detect a status change: Synchronous Bundle Listener and Bundle Listener. First, the event listener of Synchronous Bundle Listener is called (synchronous execution of event notification), then , The event listener for BundleListener is called. In the case of FIG. 6, the event listener a is called before the event listener b, and the bundle Y event is notified to the bundle A before the bundle B.

ゆえに、イベント通知の優先度は、BundleListenerのイベントリスナよりもSynchronousBundleListenerのイベントリスナの方が高いことから、先にイベント通知を受けたいバンドルは、SynchronousBundleListenerとしてイベントリスナを登録しておけばよい。   Therefore, since the priority of event notification is higher in the event listener of Synchronous BundleLister than the event listener of BundleLister, the event listener may be registered as SynchronousBundleListener for the bundle to receive event notification first.

「OSGi Service Platform Core Specification」、OSGi Alliance、Release 4、Version 4.3、April 2011、<URL:http://www.osgi.org/Download/Release4V43>“OSGi Service Platform Core Specification”, OSGi Alliance, Release 4, Version 4.3, April 2011, <URL: http: // www. osgi. org / Download / Release4V43>

しかしながら、SynchronousBundleListenerとして登録されたイベントリスナが複数ある場合、その複数のイベントリスナ間での呼び出し順序はOSGiフレームワークの実装に依存し不定であることから、以下のような問題があった。   However, when there are a plurality of event listeners registered as Synchronous Bundle Listeners, the calling order between the plurality of event listeners depends on the implementation of the OSGi framework and has the following problems.

例えば、リソースが限られたデバイスでOSGiフレームワークを利用する場合には、バンドル毎の消費リソースを管理する必要がある。管理すべきリソースの1つとしてヒープメモリ消費量がある。ここで、バンドル毎のヒープメモリ消費量の管理を行うManagement Agentをメモリ管理MAとする。   For example, when using the OSGi framework on a device with limited resources, it is necessary to manage the consumed resources for each bundle. One resource to be managed is heap memory consumption. Here, the Management Agent that manages the heap memory consumption for each bundle is defined as a memory management MA.

メモリ管理MAとは、OSGiフレームワーク上で動作するバンドルのライフサイクル制御やリソース消費量の管理を行う役割を担うもので、1つ以上のバンドルで構成される。   The memory management MA plays a role of performing life cycle control of bundles operating on the OSGi framework and management of resource consumption, and is composed of one or more bundles.

Java(登録商標)では、クラスがロードされる際に一度だけ実行されるコード(staticイニシャライザ)を記載することができ、この処理においてヒープメモリが消費される可能性がある。よって、メモリ管理MAは、バンドルに含まれるクラスがロードされる前(バンドルがヒープメモリを消費する前)に、管理を開始するための準備を行う必要がある。   In Java (registered trademark), it is possible to describe code (static initializer) that is executed only once when a class is loaded, and heap memory may be consumed in this process. Therefore, the memory management MA needs to prepare for starting the management before the class included in the bundle is loaded (before the bundle consumes the heap memory).

また、OSGiフレームワークでは、バンドル毎にクラスローダ(バンドルクラスローダ)が生成され、バンドルに含まれるクラスは、バンドルクラスローダからロードされる。よって、メモリ管理MAは、バンドル毎のヒープメモリ消費量を管理するため、このバンドルクラスローダが生成された直後から管理を開始する必要がある。   In the OSGi framework, a class loader (bundle class loader) is generated for each bundle, and classes included in the bundle are loaded from the bundle class loader. Therefore, since the memory management MA manages the heap memory consumption for each bundle, it is necessary to start the management immediately after the bundle class loader is generated.

OSGi仕様によれば、バンドルクラスローダはバンドルのステートがRESOLVEDとなった以降に生成されるという規定があるため、メモリ管理MAは、SynchronousBundleListenerのイベントリスナを登録し、バンドルのRESOLVEDイベントを検知した際に上記準備を行うことが考えられる。   According to the OSGi specification, since the bundle class loader is generated after the bundle state becomes RESOLVED, the memory management MA registers an event listener for SynchronousBundleListener and detects a RESOLVED event for the bundle. It is conceivable to make the above preparation.

ここで、メモリ管理MAと同様に、SynchronousBundleListenerのイベントリスナを登録してバンドルのRESOLVEDイベント契機で処理を行うバンドルXが存在すると仮定する。   Here, as with the memory management MA, it is assumed that there is a bundle X that registers an event listener of the Synchronous BundleLister and performs processing in response to the RESOLVED event of the bundle.

OSGi仕様では、前述したように複数のSynchronousBundleListenerの呼び出し順序は不定であることから、あるバンドルYのバンドルのステートがRESOLVEDとなった際のBundleEvent通知(イベント通知)は、メモリ管理MAが登録したSynchronousBundleListenerのイベントリスナよりもバンドルXが登録したSynchronousBundleListenerのイベントリスナが先に呼び出される可能性がある。   In the OSGi specification, as described above, the calling order of a plurality of Synchronous Bundle Listeners is indefinite. Therefore, a Bundle Event notification (event notification) when the bundle state of a certain bundle Y becomes RESOLVED is a Synchronous Bundle Listener registered by the memory management MA. There is a possibility that the event listener of the Synchronous BundleLister registered by the bundle X will be called earlier than the event listener of.

その場合、メモリ管理MAがバンドル毎のヒープメモリ消費量の管理を開始する前に、バンドルXによる何らかの処理によりバンドルYがヒープメモリを消費してしまう。こうなると、メモリ管理MAがバンドルYの消費するヒープメモリ消費量の管理を開始する前に、バンドルYがヒープメモリを消費してしまうことになり、メモリ管理MAにおいて所期するメモリ管理を実現できないことになる。   In this case, the bundle Y consumes the heap memory by some processing by the bundle X before the memory management MA starts managing the heap memory consumption for each bundle. In this case, the bundle Y consumes the heap memory before the memory management MA starts managing the heap memory consumption consumed by the bundle Y, and thus the memory management expected in the memory management MA cannot be realized. It will be.

つまり、上記メモリ管理MAのバンドルのように、どのバンドルよりも先にバンドルのステータス変更によるイベント通知を受けたいバンドルがあったとしても、他のバンドルがイベントリスナをSynchronousBundleListenerとして登録している場合には、その呼び出し順序は不定であるため、そのバンドルが登録するイベントリスナが最優先にイベント通知を受けられる保証はない。   In other words, even if there is a bundle that wants to receive an event notification by changing the bundle status before any bundle, such as the bundle of the memory management MA, when another bundle registers an event listener as a Synchronous Bundle Listener. Since the calling order is indefinite, there is no guarantee that the event listener registered by the bundle will receive the event notification with the highest priority.

本発明は、上記を鑑みてなされたものであり、その課題とするところは、SynchronousBundleListenerとして登録されているイベントリスナへのイベント通知順序をバンドル単位で保証することにある。   The present invention has been made in view of the above, and an object of the present invention is to guarantee the order of event notification to event listeners registered as Synchronous BundleListers in units of bundles.

請求項1記載のイベント通知方法は、SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知方法において、コンピュータにより、優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持する第1のステップと、前記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持する第2のステップと、バンドルのステータスが変更した際に、前記イベント通知対象リストに保持されているバンドル識別子のうち前記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行う第3のステップと、を有し、前記優先的にイベント通知を受けるバンドルは、他のバンドルのリソース管理を行うバンドルであることを特徴とする。 The event notification method according to claim 1, wherein an event notification method for notifying an event listener of a Synchronous Bundle Listener is a first step of reading out and holding an identifier of a bundle that receives event notification preferentially from a property file by a computer. A second step of holding in the event notification target list the identifiers of all bundles that called the addBundleLister method of the BundleContext interface when registering the event listener with the OSGi framework, and when the status of the bundle changes, The bundle identifier that matches the bundle identifier read from the property file among the bundle identifiers held in the event notification target list Possess a third step of preferentially event notification to the event listener, and the bundle of preferentially receiving an event notification, characterized in that it is a bundle of performing resource management of other bundles .

本発明によれば、SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知方法において、優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持し、上記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持し、バンドルのステータスが変更した際に、そのイベント通知対象リストに保持されているバンドル識別子のうち上記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行うため、SynchronousBundleListenerとして登録されているイベントリスナへのイベント通知順序をバンドル単位で保証することができる。また、優先的にイベント通知を受けるバンドルは、他のバンドルのリソース管理を行うバンドルであるため、優先順位不確定に起因するリソースの管理漏れを解消することができる。 According to the present invention, in an event notification method for notifying an event listener of a Synchronous BundleLister, an identifier of a bundle that receives event notification preferentially is read from the property file and stored, and the event listener is registered in the OSGi framework. In the event notification target list, the identifiers of all bundles that have called the addBundleLister method of the BundleContext interface are stored in the event notification target list, and when the bundle status changes, the bundle identifiers stored in the event notification target list In order to preferentially notify the event listener of the bundle identifier that matches the read bundle identifier, Syncron The event notification sequence of the event listener is registered as usBundleListener can be guaranteed by the bundle units. Further, since the bundle that receives the event notification preferentially is a bundle that performs resource management of other bundles, it is possible to eliminate omission of management of resources due to uncertain priority.

請求項2記載のイベント通知方法は、請求項1記載のイベント通知方法において、前記優先的にイベント通知を受けるバンドルは複数であって、前記第1のステップにおいて、複数のバンドル識別子の優先順位を更に保持し、前記第3のステップにおいて、前記優先順位に基づき前記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うことを特徴とする。 The event notification method according to claim 2 is the event notification method according to claim 1, wherein there are a plurality of bundles that receive the event notification preferentially, and the priority order of the plurality of bundle identifiers is set in the first step . Further, in the third step , event notification is performed to each event listener of the plurality of matching bundle identifiers based on the priority order.

本発明によれば、優先的にイベント通知を受けるバンドルは複数であって、その複数のバンドル識別子の優先順位に基づき、上記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うため、優先的にイベント通知を受けるバンドル間でのイベント通知順序を保証することができる。   According to the present invention, there are a plurality of bundles that receive event notification preferentially, and the event notification is performed to each event listener of the plurality of matching bundle identifiers based on the priority order of the plurality of bundle identifiers. It is possible to guarantee an event notification order between bundles that receive event notifications preferentially.

請求項記載のイベント通知方法は、請求項2記載のイベント通知方法において、前記優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、他のバンドルのリソース管理を行うバンドルであることを特徴とする。 Event notification method of claim 3, wherein, in the event notification method according to claim 2, wherein preferentially event notified by the bundle priority of the uppermost of the plurality of bundles, performs resource management of other bundles It is a bundle.

本発明によれば、優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、他のバンドルのリソース管理を行うバンドルであるため、優先順位不確定に起因するリソースの管理漏れを解消することができる。   According to the present invention, the bundle with the highest priority among the plurality of bundles that are preferentially notified of events is a bundle that performs resource management of other bundles, and therefore, management of resources due to uncertain priority. Leakage can be eliminated.

請求項記載のイベント通知装置は、SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知装置において、優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持する第1の保持手段と、前記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持する第2の保持手段と、バンドルのステータスが変更した際に、前記イベント通知対象リストに保持されているバンドル識別子のうち前記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行う通知手段と、を有し、前記優先的にイベント通知を受けるバンドルは、他のバンドルのリソース管理を行うバンドルであることを特徴とする。 The event notification device according to claim 4, wherein an event notification device that performs event notification to an event listener of a Synchronous BundleListener, first holding means that reads and holds an identifier of a bundle that receives event notification preferentially from a property file; and A second holding means for holding in the event notification target list all the identifiers of bundles that have called the addBundleLister method of the BundleContext interface when registering the event listener with the OSGi framework, and the event when the status of the bundle is changed. Among the bundle identifiers held in the notification target list, the event identifier of the bundle identifier that matches the bundle identifier read from the property file Preferentially possess a notification unit for performing an event notification, the by, the bundle preferentially receive event notification, characterized in that it is a bundle of performing resource management of the other bundles.

本発明によれば、SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知装置において、優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持し、上記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持し、バンドルのステータスが変更した際に、そのイベント通知対象リストに保持されているバンドル識別子のうち上記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行うため、SynchronousBundleListenerとして登録されているイベントリスナへのイベント通知順序をバンドル単位で保証することができる。また、優先的にイベント通知を受けるバンドルは、他のバンドルのリソース管理を行うバンドルであるため、優先順位不確定に起因するリソースの管理漏れを解消することができる。 According to the present invention, in an event notification device that notifies an event listener of a Synchronous BundleLister, an identifier of a bundle that receives the event notification is read from the property file and stored, and the event listener is registered in the OSGi framework. In the event notification target list, the identifiers of all bundles that have called the addBundleLister method of the BundleContext interface are stored in the event notification target list, and when the bundle status changes, the bundle identifiers stored in the event notification target list In order to preferentially notify the event listener of the bundle identifier that matches the read bundle identifier, Syncron The event notification sequence of the event listener is registered as usBundleListener can be guaranteed by the bundle units. Further, since the bundle that receives the event notification preferentially is a bundle that performs resource management of other bundles, it is possible to eliminate omission of management of resources due to uncertain priority.

請求項記載のイベント通知装置は、請求項記載のイベント通知装置において、前記優先的にイベント通知を受けるバンドルは複数であって、前記第1の保持手段は、複数のバンドル識別子の優先順位を更に保持し、前記通知手段は、前記優先順位に基づき前記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うことを特徴とする。 The event notification device according to claim 5 is the event notification device according to claim 4 , wherein a plurality of bundles receive the event notification preferentially, and the first holding unit includes a priority order of a plurality of bundle identifiers. And the notification means performs event notification to each event listener of the matching bundle identifier based on the priority.

本発明によれば、優先的にイベント通知を受けるバンドルは複数であって、その複数のバンドル識別子の優先順位に基づき、上記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うため、優先的にイベント通知を受けるバンドル間でのイベント通知順序を保証することができる。   According to the present invention, there are a plurality of bundles that receive event notification preferentially, and the event notification is performed to each event listener of the plurality of matching bundle identifiers based on the priority order of the plurality of bundle identifiers. It is possible to guarantee an event notification order between bundles that receive event notifications preferentially.

請求項記載のイベント通知装置は、請求項記載のイベント通知装置において、前記優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、他のバンドルのリソース管理を行うバンドルであることを特徴とする。 The event notification device according to claim 6 is the event notification device according to claim 5 , wherein the bundle with the highest priority among the plurality of bundles to which the event notification is preferentially performed performs resource management of other bundles. It is a bundle.

本発明によれば、優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、他のバンドルのリソース管理を行うバンドルであるため、優先順位不確定に起因するリソースの管理漏れを解消することができる。
請求項7記載のイベント通知プログラムは、請求項1乃至3のいずれかに記載のイベント通知方法をコンピュータに実行させることを特徴とする。
According to the present invention, the bundle with the highest priority among the plurality of bundles that are preferentially notified of events is a bundle that performs resource management of other bundles, and therefore, management of resources due to uncertain priority. Leakage can be eliminated.
An event notification program according to a seventh aspect causes a computer to execute the event notification method according to any one of the first to third aspects.

本発明によれば、SynchronousBundleListenerとして登録されているイベントリスナへのイベント通知順序をバンドル単位で保証することができる。   According to the present invention, the order of event notification to an event listener registered as a Synchronous Bundle Listener can be guaranteed in bundle units.

イベント通知装置の機能ブロック構成を示す図である。It is a figure which shows the functional block structure of an event notification apparatus. 優先バンドルのBundleSymbolicNameの設定例を示す図である。It is a figure which shows the example of a setting of Bundle SymbolName of a priority bundle. イベント通知装置の処理フローを示す図である。It is a figure which shows the processing flow of an event notification apparatus. 優先バンドルのBundleSymbolicNameの設定例を示す図である。It is a figure which shows the example of a setting of Bundle SymbolName of a priority bundle. イベント通知装置の処理フローを示す図である。It is a figure which shows the processing flow of an event notification apparatus. イベント通知される仕組みを説明する図である。It is a figure explaining the mechanism notified of an event.

以下、本発明を実施する一実施の形態について図面を用いて説明する。但し、本発明は多くの異なる様態で実施することが可能であり、本実施の形態の記載内容に限定して解釈すべきではない。   Hereinafter, an embodiment for carrying out the present invention will be described with reference to the drawings. However, the present invention can be implemented in many different modes and should not be construed as being limited to the description of the present embodiment.

〔第1の実施の形態〕
第1の実施の形態では、SynchronousBundleListenerとして登録された複数のイベントリスナのうち、ある特定のバンドルによって登録されたイベントリスナに対して優先的にイベント通知を行う方法について説明する。
[First Embodiment]
In the first embodiment, a method for preferentially notifying an event listener registered by a specific bundle among a plurality of event listeners registered as a Synchronous BundleLister will be described.

図1は、第1の実施の形態に係るイベント通知装置の機能ブロック構成を示す図である。本イベント通知装置100は、OSGiフレームワーク上で動作し、設定部11と、第1判定部13と、第1取得・保持部14と、第2判定部15と、第2取得・保持部16と、照合部17と、通知部18とを備えている。   FIG. 1 is a diagram illustrating a functional block configuration of the event notification device according to the first embodiment. The event notification device 100 operates on the OSGi framework, and includes a setting unit 11, a first determination unit 13, a first acquisition / holding unit 14, a second determination unit 15, and a second acquisition / holding unit 16. A collation unit 17 and a notification unit 18.

このようなイベント通知装置100は、メモリ等の記憶手段やCPU等の計算・制御手段を備えたコンピュータで実現可能であり、その動作処理はプログラムによって実行される。以下、各機能部について説明する。   Such an event notification device 100 can be realized by a computer having a storage unit such as a memory and a calculation / control unit such as a CPU, and its operation processing is executed by a program. Hereinafter, each functional unit will be described.

設定部11は、JVM(Java Virtual Machine)が有するJavaシステムプロパティファイル12へ優先的にイベント通知を受けるバンドル(以下、優先バンドル)のBundleSymbolicName(バンドル識別子)を設定する機能を有する。   The setting unit 11 has a function of setting a bundle symbolic name (bundle identifier) of a bundle (hereinafter referred to as a priority bundle) that receives an event notification preferentially to the Java system property file 12 included in the JVM (Java Virtual Machine).

例えば、図2に示すように設定する。「prioritized.listener」は、優先バンドルを指定するためのkeyであり、「com.acme.bundleA」は、BundleSymbolicNameを示している。   For example, the setting is made as shown in FIG. “Prioritized.listener” is a key for designating a priority bundle, and “com.acme.bundleA” indicates a Bundle SymbolicName.

尚、Javaシステムプロパティファイル12を用いるのは例であり、OSGiフレームワーク起動時に読み込まれるプロパティファイルであれば任意に利用できる。また、Javaシステムプロパティファイル12は、JVMによって管理されたメモリに記憶され、当該メモリから読み出されることによって適宜利用される。   The use of the Java system property file 12 is an example, and any property file that is read when the OSGi framework is activated can be used arbitrarily. The Java system property file 12 is stored in a memory managed by the JVM, and is used as appropriate by being read from the memory.

第1判定部13は、OSGiフレームワーク起動時に読み込まれたJavaシステムプロパティファイル12に優先バンドルのBundleSymbolicNameが設定されているか否かを判定する機能を有する。   The first determination unit 13 has a function of determining whether or not the bundle bundle name of the priority bundle is set in the Java system property file 12 read when the OSGi framework is activated.

第1取得・保持部14は、優先バンドルのBundleSymbolicNameをJavaシステムプロパティファイル12から取得して、保持する機能を有する。   The first acquisition / holding unit 14 has a function of acquiring and holding the bundle symbolic name of the priority bundle from the Java system property file 12.

第2判定部15は、イベントリスナをOSGiに登録する時にBundleContext#addBundleListener(BundleListener)が呼びされた際、そのBundleContext#addBundleListener(BundleListener)に登録されたBundleListenerの型(イベントリスナの型)が、SynchronousBundleListener型か否かを判定する機能を有する。   When the BundleContext # addBundleListener (BundleListener) is called when registering the event listener in the OSGi, the second determination unit 15 uses the BundleList listener of the type BundleListener (BundleListener) and the BundleList listener of the type BundleListener (BundleListener). It has a function of determining whether or not it is a mold.

尚、BundleContext#addBundleListener(BundleListener)とは、BundleContextインタフェースのaddBundleListenerメソッドを意味し、SynchronousBundleListener等、バンドルのステータス変更に基づくイベント通知を受けるイベントリスナを登録するOSGi仕様のAPI(Application Program Interface)である(非特許文献1参照)。   Note that BundleContext # addBundleListener (BundleListener) refers to the BundleContext interface's addBundleListener method, such as SynchronousBundleListener, which registers the event listener based on the bundle status change. Non-patent document 1).

第2取得・保持部16は、第2判定部15での判定結果がSynchronousBundleListener型である場合に、BundleContext#addBundleListener(BundleListener)を呼び出した全てのバンドルからBundleSymbolicNameをそれぞれ取得し、イベント通知対象バンドルリストに保持しておく機能を有する。   When the determination result in the second determination unit 15 is the Synchronous BundleLister type, the second acquisition / holding unit 16 acquires the bundle notification name from all bundles that have called BundleContext # addBundleListener (BundleListener) and lists the event target bundles. It has the function to hold in.

尚、OSGiフレームワークは、BundleContext#addBundleListener(BundleListener)の呼び出し元のバンドルを把握しているため、そのバンドルからBundleSymbolicNameを取得することができる。   Note that since the OSGi framework knows the bundle of the caller of BundleContext # addBundleListener (BundleListener), it can acquire the Bundle SymbolicName from that bundle.

照合部17は、イベント通知対象バンドルリスト内の各BundleSymbolicNameが優先バンドルのBundleSymbolicNameであるかどうかを判断するため、イベント通知対象バンドルリスト内の各BundleSymbolicNameについて、「prioritized.listener」に対応して保持されているBundleSymbolicNameと照合する機能を有する。   In order to determine whether each Bundle Symbolic Name in the event notification target bundle list is a Bundle Symbolic Name of the priority bundle, the collation unit 17 holds each Bundle Symbolic Name in the event notification target bundle list corresponding to “prioritized.listener”. It has a function to collate with the bundle symbolic name.

通知部18は、照合部17での照合結果、合致するBundleSymbolicNameのイベントリスナに対して優先的にイベント通知を行う機能を有する。   The notification unit 18 has a function of performing event notification preferentially to the event listener of the matching bundle symbolic name that matches the collation result in the collation unit 17.

次に、イベント通知装置100の動作を説明する。図3は、イベント通知装置100の処理フローを示す図である。但し、優先バンドルのBundleSymbolicNameが既にJavaシステムプロパティファイル12に設定されているとする。   Next, the operation of the event notification device 100 will be described. FIG. 3 is a diagram illustrating a processing flow of the event notification device 100. However, it is assumed that the bundle bundle's BundleLabelName has already been set in the Java system property file 12.

最初に、OSGiフレームワークが起動すると(ステップS101)、Javaシステムプロパティファイル12が読み込まれ(ステップS102)、第1判定部13により、その読み込んだJavaシステムプロパティファイル12内に優先バンドルのBundleSymbolicNameが設定されているか(Yes)否か(No)が判定される(ステップS103)。   First, when the OSGi framework is activated (step S101), the Java system property file 12 is read (step S102), and the bundle symbol Name of the priority bundle is set in the read Java system property file 12 by the first determination unit 13. Whether or not (Yes) or not (No) is determined (step S103).

ステップS103の判定結果がYesの場合には、次に、第1取得・保持部14により、その設定されている優先バンドルのBundleSymbolicNameがJavaシステムプロパティファイル12から読み出され、保持される(ステップS104)。尚、ステップS103の判定結果がNoの場合には、ステップS104を行うことなくステップS105に進む。   If the determination result in step S103 is Yes, then, the first acquisition / holding unit 14 reads out and holds the Bundle Symbolic Name of the set priority bundle from the Java system property file 12 (step S104). ). If the determination result in step S103 is No, the process proceeds to step S105 without performing step S104.

次に、イベントリスナがOSGiフレームワークに登録されると(ステップS105)、第2判定部15により、そのイベントリスナ登録時にBundleContext#addBundleListener(BundleListener)が呼びされた際、そのBundleContext#addBundleListener(BundleListener)に登録されたBundleListenerの型(イベントリスナの型)が、SynchronousBundleListener型か(Yes)否か(No)がinstanceof演算子を用いて判定される(ステップS106)。   Next, when an event listener is registered in the OSGi framework (step S105), when the BundleContext # addBundleListener (BundleListener) is called by the second determination unit 15 when the event listener is registered, the BundleContext # addBundleListener (BundleList) (Bundle) It is determined using the instanceof operator whether or not the type of the BundleLister (type of the event listener) registered in (SynchronousBundleListener type) (Yes) or not (No) (step S106).

ステップS106の判定結果がYesの場合には、次に、第2取得・保持部16により、BundleContext#addBundleListener(BundleListener)を呼び出した全てのバンドルからBundleSymbolicNameがそれぞれ取得され、イベント通知対象バンドルリストに保持される(ステップS107)。尚、ステップS106の判定結果がNoの場合には、後述するステップS111に進む。   If the determination result in step S106 is Yes, then the second acquisition / holding unit 16 acquires the Bundle SymbolicName from all the bundles that have called BundleContext # addBundleLister (BundleListener), and holds them in the event notification target bundle list. (Step S107). In addition, when the determination result of step S106 is No, it progresses to step S111 mentioned later.

ここで、バンドルのステータス変更が発生した場合には(ステップS108)、照合部17により、ステップS107で保持したイベント通知対象バンドルリスト内のBundleSymbolicNameが、ステップS104で保持したBundleSymbolicNameと照合される(ステップS109)。   If a bundle status change occurs (step S108), the collation unit 17 collates the Bundle Symbolic Name in the event notification target bundle list retained in step S107 with the Bundle Symbolic Name retained in step S104 (step S108). S109).

その後、通知部18により、イベント通知対象バンドルリスト内のうち、ステップS109の照合結果で合致するBundleSymbolicNameのイベントリスナ(すなわち、SynchronousBundleListenerであり、且つ優先的にイベント通知を受けるように設定されたバンドルのイベントリスナ)に対して、優先的にイベント通知が行われる(ステップS110)。   Thereafter, the notification unit 18 selects a bundle symbolic name event listener (that is, a Synchronous Bundle Listener that is matched with the collation result of step S109 in the event notification target bundle list and that is set to receive event notifications preferentially. An event notification is preferentially given to the event listener (step S110).

一方、合致しないBundleSymbolicNameのイベントリスナ(すなわち、SynchronousBundleListenerであるが、優先的にイベント通知を受けるように設定されていないバンドルのイベントリスナ)に対しては、OSGi仕様で規定されている既存のイベント通知処理が行われる(ステップS111)。   On the other hand, for event listeners of BundleLabelName that do not match (that is, event listeners of bundles that are SynchronousBundleListeners but are not set to receive event notifications preferentially), existing event notifications defined in the OSGi specification Processing is performed (step S111).

これにより、フレームワーク起動時に読み込まれるJavaシステムプロパティファイル12に設定されたBundleSymbolicNameを持つバンドルによって登録されたSynchronousBundleListenerのイベントリスナは、他のSynchronousBundleListenerよりも先にイベント通知が行われる。   Thereby, the event listener of the Synchronous BundleLister registered by the bundle having the BundleLabelName set in the Java system property file 12 read at the time of starting the framework is notified of the event before the other SynchronousBundleListener.

最後に、そのような優先的に処理されるイベントリスナ以外にも様々なイベントリストが複数登録されている可能性があることから、ステップS110又はステップS111の後、イベント未通知のイベントリスナが存在するか(Yes)否か(No)が判定される(ステップS112)。そして、その判定結果がYesの場合にはステップS109に戻って残りのイベントリスナにイベント通知を行い、一方、その判定結果がNoの場合には処理を終了する。   Finally, since there may be a plurality of various event lists registered in addition to such preferentially processed event listeners, there is an event listener that has not yet been notified of events after step S110 or step S111. It is determined whether or not (Yes) or not (No) (step S112). If the determination result is Yes, the process returns to step S109 to notify the remaining event listeners of the event. On the other hand, if the determination result is No, the process ends.

本実施の形態によれば、SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知装置100において、第1取得・保持部14が、優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持し、第2取得・保持部16が、上記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持し、通知部18が、バンドルのステータスが変更した際に、そのイベント通知対象リストに保持されているバンドル識別子のうち上記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行うので、SynchronousBundleListenerとして登録されているイベントリスナへのイベント通知順序をバンドル単位で保証することができる。   According to the present embodiment, in the event notification device 100 that performs event notification to the event listener of the Synchronous BundleLister, the first acquisition / holding unit 14 reads and holds the identifier of the bundle that receives the event notification preferentially from the property file. The second acquisition / holding unit 16 holds, in the event notification target list, the identifiers of all bundles that have called the bundlebundleListener method of the BundleContext interface when registering the event listener in the OSGi framework. Bundle identification that matches the bundle identifier read from the above property file among the bundle identifiers held in the event notification target list Since for the event listener performs preferentially event notification, it is possible to guarantee an event notification sequence of the event listener is registered as SynchronousBundleListener bundle units.

〔第2の実施の形態〕
第2の実施の形態では、優先バンドルが複数存在する場合に、その複数の優先バンドル間において優先的なイベント通知を実現する方法について説明する。
[Second Embodiment]
In the second embodiment, a description will be given of a method for realizing priority event notification between a plurality of priority bundles when there are a plurality of priority bundles.

本実施の形態に係るイベント通知装置100の機能構成は、図1に示した第1の実施の形態と同様である。以下、第1の実施の形態で説明した機能との相違について説明する。   The functional configuration of the event notification device 100 according to the present embodiment is the same as that of the first embodiment shown in FIG. Hereinafter, differences from the functions described in the first embodiment will be described.

設定部11は、複数の優先バンドルの各BundleSymbolicNameをJavaシステムプロパティファイル12にそれぞれ設定すると共に、それら優先バンドル間での優先順位を各BundleSymbolicNameに対応付けてそれぞれ設定する機能を有する。   The setting unit 11 has a function of setting each Bundle Symbolic Name of a plurality of priority bundles in the Java system property file 12 and setting the priority order among these priority bundles in association with each Bundle Symbolic Name.

例えば、図4に示すように設定する。図4(a)において、各BundleSymbolicNameの後にそれぞれ指定された各数値は、イベント通知の優先度を意味する。数値は1以上の整数で指定され、数値が低く設定されているバンドルが優先的にイベント通知される。数値で示す方法に代えて、アルファベット順に優先度を指定してもよいし、図4(b)のようにBundleSymbolicNameの記述順に優先度を指定してもよい。   For example, the setting is made as shown in FIG. In FIG. 4A, each numerical value specified after each Bundle SymbolicName means the priority of event notification. A numerical value is designated by an integer of 1 or more, and a bundle whose numerical value is set low is notified of an event preferentially. Instead of the numerical method, the priorities may be designated in alphabetical order, or the priorities may be designated in the description order of Bundle SymbolicName as shown in FIG.

第1取得・保持部14は、複数の優先バンドルの各BundleSymbolicName及びその優先順位をJavaシステムプロパティファイル12から取得して、保持する機能を有する。   The first acquisition / holding unit 14 has a function of acquiring and holding each Bundle Symbolic Name of a plurality of priority bundles and their priorities from the Java system property file 12.

通知部18は、照合部17での照合結果、合致する複数のBundleSymbolicNameの各イベントリスナに対して、設定された優先順位に基づき、優先的にイベント通知をそれぞれ行う機能を有する。   The notification unit 18 has a function of performing event notification on a priority basis for each event listener of a plurality of matching bundle symbolic names based on the collation result in the collation unit 17 based on the set priority order.

次に、イベント通知装置100の動作を説明する。図5は、イベント通知装置100の処理フローを示す図である。但し、複数の優先バンドルの各BundleSymbolicName及びその優先順位が既にJavaシステムプロパティファイル12に設定されているとする。   Next, the operation of the event notification device 100 will be described. FIG. 5 is a diagram illustrating a processing flow of the event notification device 100. However, it is assumed that each Bundle Symbol Name of a plurality of priority bundles and the priority order thereof are already set in the Java system property file 12.

最初に、OSGiフレームワークが起動すると(ステップS201)、Javaシステムプロパティファイル12が読み込まれ(ステップS202)、第1判定部13により、その読み込んだJavaシステムプロパティファイル12内に優先バンドルのBundleSymbolicNameが設定されているか(Yes)否か(No)が判定される(ステップS203)。   First, when the OSGi framework is activated (step S201), the Java system property file 12 is read (step S202), and the bundle symbolic name of the priority bundle is set in the read Java system property file 12 by the first determination unit 13. Whether or not (Yes) or not (No) is determined (step S203).

ステップS203の判定結果がYesの場合には、次に、第1取得・保持部14により、その設定されている全ての優先バンドルの各BundleSymbolicNameがJavaシステムプロパティファイル12からそれぞれ読み出され、保持される(ステップS204)。尚、ステップS203の判定結果がNoの場合には、ステップS204を行うことなくステップS205に進む。   If the determination result in step S203 is Yes, then the first acquisition / holding unit 14 reads and holds the Bundle Symbolic Names of all the set priority bundles from the Java system property file 12, respectively. (Step S204). If the determination result in step S203 is No, the process proceeds to step S205 without performing step S204.

次に、イベントリスナがOSGiフレームワークに登録されると(ステップS205)、第2判定部15により、そのイベントリスナ登録時にBundleContext#addBundleListener(BundleListener)が呼びされた際、そのBundleContext#addBundleListener(BundleListener)に登録されたBundleListenerの型(イベントリスナの型)が、SynchronousBundleListener型か(Yes)否か(No)がinstanceof演算子を用いて判定される(ステップS206)。   Next, when the event listener is registered in the OSGi framework (step S205), when the BundleContext # addBundleListener (BundleListener) is called by the second determination unit 15 when the event listener is registered, the BundleContext # addBundleLister (Bundle) It is determined using the instanceof operator whether or not the type of the BundleListener registered in (the type of event listener) is the Synchronous BundleLister type (Yes) (No).

ステップS206の判定結果がYesの場合には、次に、第2取得・保持部16により、BundleContext#addBundleListener(BundleListener)を呼び出した全てのバンドルからBundleSymbolicNameがそれぞれ取得され、イベント通知対象バンドルリストに保持される(ステップS207)。尚、ステップS206の判定結果がNoの場合には、後述するステップS211に進む。   If the determination result in step S206 is Yes, then the second acquisition / holding unit 16 acquires the Bundle SymbolicName from all the bundles that called the BundleContext # addBundleListener (BundleListener), and holds them in the event notification target bundle list. (Step S207). In addition, when the determination result of step S206 is No, it progresses to step S211 mentioned later.

ここで、バンドルのステータス変更が発生した場合には(ステップS208)、照合部17により、ステップS207で保持したイベント通知対象バンドルリスト内のBundleSymbolicNameが、ステップS204で保持した各BundleSymbolicNameとそれぞれ照合される(ステップS209)。   If a bundle status change occurs (step S208), the collation unit 17 collates the Bundle Symbolic Name in the event notification target bundle list held in step S207 with each Bundle Symbolic Name held in step S204. (Step S209).

その後、通知部18により、イベント通知対象バンドルリスト内のうち、ステップS209の照合結果で合致する複数のBundleSymbolicNameの各イベントリスナ(すなわち、SynchronousBundleListenerであり、且つ優先的にイベント通知を受けるように設定されたバンドルのイベントリスナ)に対して、指定されている優先順位に従って、優先的にイベント通知が行われる(ステップS210)。   Thereafter, the notification unit 18 sets each event listener of a plurality of Bundle Symbolic Names that match the collation result in step S209 in the event notification target bundle list (that is, a Synchronous Bundle Listener and receives event notifications with priority). Event notification) is preferentially performed according to the designated priority order (step S210).

一方、合致しないBundleSymbolicNameのイベントリスナ(すなわち、SynchronousBundleListenerであるが、優先的にイベント通知を受けるように設定されていないバンドルのイベントリスナ)に対しては、OSGi仕様で規定されている既存のイベント通知処理が行われる(ステップS211)。   On the other hand, for event listeners of BundleLabelName that do not match (that is, event listeners of bundles that are SynchronousBundleListeners but are not set to receive event notifications preferentially), existing event notifications defined in the OSGi specification Processing is performed (step S211).

これにより、フレームワーク起動時に読み込まれるJavaシステムプロパティファイル12に設定されたBundleSymbolicNameを持つバンドルによって登録されたSynchronousBundleListenerの各イベントリスナに対し、指定された優先順位に沿ってイベント通知が優先的に行われる。   As a result, event notification is preferentially performed according to the specified priority order for each event listener of the Synchronous Bundle Listener registered by the bundle having the Bundle Symbolic Name set in the Java system property file 12 read when the framework is started. .

最後に、そのような優先的に処理されるイベントリスナ以外にも様々なイベントリストが複数登録されている可能性があることから、ステップS210又はステップS211の後、イベント未通知のイベントリスナが存在するか(Yes)否か(No)が判定される(ステップS212)。そして、その判定結果がYesの場合にはステップS209に戻って残りのイベントリスナにイベント通知を行い、一方、その判定結果がNoの場合には処理を終了する。   Finally, since there may be a plurality of various event lists registered in addition to such preferentially processed event listeners, there is an event listener that has not yet been notified of events after step S210 or step S211. It is determined whether or not (Yes) or not (No) (step S212). If the determination result is Yes, the process returns to step S209 to notify the remaining event listeners of the event. On the other hand, if the determination result is No, the process ends.

本実施の形態によれば、優先的にイベント通知を受けるバンドルは複数であって、通知部18が、その複数のバンドル識別子の優先順位に基づき、上記照合の結果、合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うので、優先的にイベント通知を受けるバンドル間でのイベント通知順序を保証することができる。   According to the present embodiment, there are a plurality of bundles that are preferentially receiving event notifications, and the notification unit 18 determines the matching bundle identifiers as a result of the above collation based on the priority order of the plurality of bundle identifiers. Since event notification is performed for each event listener, it is possible to guarantee the order of event notification between bundles that receive event notification preferentially.

すなわち、従来の技術では、バンドルのステータス変更が発生した際に、そのイベント通知を受けることができるSynchronousBundleListenerのイベントリスナについて、権限さえあればどのバンドルでも登録でき、その呼び出し順序を保証することはできなかった。しかし、これまで説明したイベント通知装置100を用いることによって、上記イベントを優先的に検知するべきバンドルに対する優先的なイベント通知を保証できるようになる。   In other words, in the conventional technology, when a bundle status change occurs, any bundle listener of SynchronousBundleListener that can receive event notifications can be registered with any privilege, and the calling order can be guaranteed. There wasn't. However, by using the event notification device 100 described so far, it becomes possible to guarantee the priority event notification for the bundle that should preferentially detect the event.

最後に、第1の実施の形態で説明した優先バンドルや、第2の実施の形態で説明した優先順位が最も高い優先バンドルとしては、例えば、他のバンドルのリソース管理を行うメモリ管理バンドル(課題で説明したメモリ管理MA)がある。これにより、ヒープメモリ消費量の管理等、バンドルのリソース管理を特定のイベントを使って行う際に、管理を行うバンドルを優先することにより、優先順位不確定に起因するリソースの管理漏れを解消することができる。   Finally, as the priority bundle described in the first embodiment and the priority bundle having the highest priority described in the second embodiment, for example, a memory management bundle that performs resource management of other bundles (problem) Memory management MA) described in the above. As a result, when performing bundle resource management, such as managing heap memory consumption, using specific events, priority is given to the bundle to be managed, thereby eliminating resource omissions due to uncertain priority. be able to.

100…イベント通知装置
11…設定部
12…Javaシステムプロパティファイル
13…第1判定部
14…第1取得・保持部(第1の保持手段)
15…第2判定部
16…第2取得・保持部(第2の保持手段)
17…照合部
18…通知部(通知手段)
S101〜S112、S201〜S212…ステップ
DESCRIPTION OF SYMBOLS 100 ... Event notification apparatus 11 ... Setting part 12 ... Java system property file 13 ... 1st determination part 14 ... 1st acquisition / holding | maintenance part (1st holding means)
15 ... 2nd determination part 16 ... 2nd acquisition and holding | maintenance part (2nd holding means)
17 ... Verification unit 18 ... Notification unit (notification means)
S101-S112, S201-S212 ... step

Claims (7)

SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知方法において、
コンピュータにより、
優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持する第1のステップと、
前記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持する第2のステップと、
バンドルのステータスが変更した際に、前記イベント通知対象リストに保持されているバンドル識別子のうち前記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行う第3のステップと、を有し、
前記優先的にイベント通知を受けるバンドルは、
他のバンドルのリソース管理を行うバンドルであることを特徴とするイベント通知方法。
In the event notification method for notifying the event listener of the Synchronous BundleListener,
By computer
A first step of reading from the property file and holding the identifier of the bundle that receives the event notification preferentially;
A second step of storing, in the event notification target list, identifiers of all bundles that have called the addBundleLister method of the BundleContext interface when registering the event listener with the OSGi framework;
When the bundle status is changed, the event notification is performed preferentially to the event listener of the bundle identifier that matches the bundle identifier read from the property file among the bundle identifiers held in the event notification target list. 3 and the step of, the possess,
The bundle that receives the event notification with priority is:
An event notification method characterized by being a bundle for performing resource management of another bundle .
前記優先的にイベント通知を受けるバンドルは複数であって、
前記第1のステップにおいて、複数のバンドル識別子の優先順位を更に保持し、
前記第3のステップにおいて
前記優先順位に基づき前記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うことを特徴とする請求項1記載のイベント通知方法。
There are a plurality of bundles that receive the event notification preferentially,
In the first step , the priority order of the plurality of bundle identifiers is further maintained,
In the third step,
The event notification method according to claim 1, wherein event notification is performed to each event listener of the plurality of matching bundle identifiers based on the priority.
前記優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、Among the bundles that are preferentially notified of events, the bundle with the highest priority is
他のバンドルのリソース管理を行うバンドルであることを特徴とする請求項2記載のイベント通知方法。3. The event notification method according to claim 2, wherein the event notification method is a bundle for performing resource management of another bundle.
SynchronousBundleListenerのイベントリスナにイベント通知を行うイベント通知装置において、In an event notification device for notifying an event listener of a Synchronous BundleListener,
優先的にイベント通知を受けるバンドルの識別子をプロパティファイルから読み出して保持する第1の保持手段と、First holding means for reading and holding an identifier of a bundle that receives event notification preferentially from a property file;
前記イベントリスナをOSGiフレームワークに登録する際にBundleContextインタフェースのaddBundleListenerメソッドを呼び出した全てのバンドルの識別子をイベント通知対象リストに保持する第2の保持手段と、A second holding unit that holds, in the event notification target list, identifiers of all bundles that have called the addBundleLister method of the BundleContext interface when registering the event listener in the OSGi framework;
バンドルのステータスが変更した際に、前記イベント通知対象リストに保持されているバンドル識別子のうち前記プロパティファイルから読み出したバンドル識別子に合致するバンドル識別子のイベントリスナに対して優先的にイベント通知を行う通知手段と、を有し、Notification that preferentially notifies the event listener of the bundle identifier that matches the bundle identifier read from the property file among the bundle identifiers held in the event notification target list when the status of the bundle changes Means,
前記優先的にイベント通知を受けるバンドルは、The bundle that receives the event notification with priority is:
他のバンドルのリソース管理を行うバンドルであることを特徴とするイベント通知装置。An event notification device characterized by being a bundle for performing resource management of another bundle.
前記優先的にイベント通知を受けるバンドルは複数であって、There are a plurality of bundles that receive the event notification preferentially,
前記第1の保持手段は、複数のバンドル識別子の優先順位を更に保持し、The first holding means further holds the priority order of a plurality of bundle identifiers,
前記通知手段は、The notification means includes
前記優先順位に基づき前記合致する複数のバンドル識別子の各イベントリスナにイベント通知をそれぞれ行うことを特徴とする請求項4記載のイベント通知装置。The event notification device according to claim 4, wherein event notification is performed to each event listener of the plurality of matching bundle identifiers based on the priority.
前記優先的にイベント通知される複数のバンドルのうち優先順位が最上位のバンドルは、Among the bundles that are preferentially notified of events, the bundle with the highest priority is
他のバンドルのリソース管理を行うバンドルであることを特徴とする請求項5記載のイベント通知装置。6. The event notification device according to claim 5, wherein the event notification device is a bundle that performs resource management of another bundle.
請求項1乃至3のいずれかに記載のイベント通知方法をコンピュータに実行させることを特徴とするイベント通知プログラム。An event notification program causing a computer to execute the event notification method according to claim 1.
JP2012140851A 2012-06-22 2012-06-22 Event notification method, program, and apparatus Expired - Fee Related JP5458147B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012140851A JP5458147B2 (en) 2012-06-22 2012-06-22 Event notification method, program, and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012140851A JP5458147B2 (en) 2012-06-22 2012-06-22 Event notification method, program, and apparatus

Publications (2)

Publication Number Publication Date
JP2014006641A JP2014006641A (en) 2014-01-16
JP5458147B2 true JP5458147B2 (en) 2014-04-02

Family

ID=50104315

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012140851A Expired - Fee Related JP5458147B2 (en) 2012-06-22 2012-06-22 Event notification method, program, and apparatus

Country Status (1)

Country Link
JP (1) JP5458147B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106716371A (en) * 2016-11-09 2017-05-24 达闼科技(北京)有限公司 Method of opening APPs, electronic devices, and management server

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6418004B2 (en) * 2015-02-26 2018-11-07 富士通株式会社 Event notification program, event notification method, and event notification device
US9389929B1 (en) 2015-03-24 2016-07-12 International Business Machines Corporation Granular event management for service platforms
CN111756836B (en) * 2020-06-23 2022-09-23 深圳平安医疗健康科技服务有限公司 Information sending method and device based on event management model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106716371A (en) * 2016-11-09 2017-05-24 达闼科技(北京)有限公司 Method of opening APPs, electronic devices, and management server
WO2018086017A1 (en) * 2016-11-09 2018-05-17 达闼科技(北京)有限公司 Application opening method, electronic device, and management server
CN106716371B (en) * 2016-11-09 2020-11-10 达闼科技(北京)有限公司 Application opening method, electronic equipment and management server

Also Published As

Publication number Publication date
JP2014006641A (en) 2014-01-16

Similar Documents

Publication Publication Date Title
US20100058351A1 (en) Information processing apparatus and information processing method
KR102062945B1 (en) Information processing apparatus and method of controlling the same, and program
JP5458147B2 (en) Event notification method, program, and apparatus
WO2018002991A1 (en) Control device, vnf deployment destination selection method, and program
US9189300B2 (en) Dynamic service discovery
JP6101360B2 (en) Method, apparatus, program and recording medium for setting application state
CN114615340B (en) Request processing method and device, computer equipment and storage device
CN110737453A (en) Security chip upgrading method and device and security chip
CN101969399A (en) Routing method and system for clients to call services
JP2016091555A (en) Data staging management system
EP2097848A2 (en) Method, system and computer program for monitoring components in a service framework
EP3193252B1 (en) Information processing apparatus and resource management method
US9727381B2 (en) Image forming apparatus and resource management method
CN116881003A (en) Resource allocation method, device, service equipment and storage medium
CN109558249B (en) Control method and device for concurrent operation
CN115981826A (en) Task scheduling processing method and device, computer equipment and readable storage medium
CN112130900B (en) User information management method, system, equipment and medium for BMC
US9753775B2 (en) Resource management apparatus and resource management method
JP2006331213A (en) Management system for system resource, management method for system resource, and program therefor
CN110968327A (en) Service system and deployment method thereof
CN110795100A (en) Branch merging method and device
CN112015523B (en) Event loss prevention method and device, electronic equipment and storage medium
JP5357989B2 (en) Memory management device, memory management method, and memory management program
CN106557359B (en) Task scheduling method and system
CN117632416A (en) Method, device, medium and equipment for scheduling tasks of flow engine trigger

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131018

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140110

R150 Certificate of patent or registration of utility model

Ref document number: 5458147

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees