Registering plug-ins – Echelon LNS User Manual

Page 297

Advertising
background image

LNS Programmer's Guide

283

Figure 12.1 LNS Plug-Ins and the Windows Registry

Note that the default value for each plug-in listed in the Plug-In Windows Registry key

equals the plug-in application’s Registered Server Name. For example, Figure 12.1 shows

details for the Echelon LNS Report Generator plug-in, whose default value and

registered server name is “EchelonLNSReportGenerator.Application.”

The director application must inspect the Plug-In Windows Registry key. For each plug-

in found that has not already been fully registered, or that has been previously registered
with an earlier version, the director will register the plug-in as described in the next

section, Registering Plug-Ins.

Optionally, the director may also attempt to connect to all other plug-ins in an attempt to

verify the plug-ins presence. Detecting orphan Plug-In Windows Registry keys is
described in the Advanced Plug-In Management Tasks section later in this chapter.

A complete example implementation that retrieves all unregistered and previously

registered plug-ins is contained in the example director application described in
Appendix C of this document. Related source code can be found in the ListPlugins()

method that is contained in the FrmMain class.

Registering Plug-Ins

For each plug-in detected in the Plug-In Windows Registry key, the director application
investigates each ComponentApp object that can be accessed in the relevant
ComponentApps collection. For plug-ins advertising Scope as 2 (two) in the system

registry as shown in Figure 12.1, this is the ComponentApps collection that may be

retrieved from the System object’s ComponentApps property. Scope 2 is used by plug-in

software that requires explicit registration for each network database. Most plug-ins

specify Scope as 1 (one) in the system registry. In this case, directors use the
ObjectServer object’s ComponentApps property for maintaining the registration

information. This ComponentApps collection is a global collection stored in the LNS

global database that is mostly used for managing plug-ins software across multiple
director applications. The director performs these tasks:

• For each ComponentApp object found in the registration ComponentApps

collection, the director inspects the ComponentApp object’s RegisteredServer
property. If no ComponentApp object can be found that relates to the current

plug-in stored in the Windows Registry as the registered server name, the plug-in

must be registered with LNS.

Advertising