Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Defining an autodescripted module



An autodescripted module is a Java Jar file containing the code for one application with one Java modules, and a manifest specifying where to find the configuration files for the application in the Jar file.

This jar file will be defined in the application library for an application.

Manifest properties

To define the configuration of the autodescripted module, you just have to specify the Manifest for this module, which will define:

For example:
      Modules: org/da/protoframework/tacticalenv/resources/tacticalenv.xml
      Types: org/da/protoframework/tacticalenv/resources/types.xml
      Services: org/da/protoframework/tacticalenv/resources/services.xml

Defining the module configuration

A module configuration defines:

The declaration of the configuration for an autodescripted module is identical as for any applications configuration, except that there must be only one application and one module, and no deployment. For example:
      <application name="publishAppli">
          <modules>
             <module name="PublishModule" >
                <implementation path="org.da.samples.protoframework.publish.PublishModule" >
                   <initEntryPoint method="init" />
                   <defaultReceiveEntryPoint method="subscribe" />
                   <defaultSendEntryPoint method="publish" />
                </implementation>
                <interfaces>
                   <eventReceived service="event"/>
                   <cyclic service="published" frequency="200ms" attach="attach"/>
                </interfaces>
             </module>
          </modules>
      </application>
Note that you need to define a top-level application, but the name of the application

Defining the module implementation

The module implementation contains:
  • The Module path which defines the class which will be instanciated for the Module at the initialization of the framework
  • The Module entry points which defines the methods which will be called for the default module entry points

Defining the module interface

The module interface declares the services for which the module is a provider or subscriber. Note that:
  • If you don't define any interface when using the autodescripted module, the default interfaces defined in the manifest module implementation description will be used
  • Else the interfaces defined when using the autodescripted module will be used

Checking services existence


In some cases, it is useful to check that an autodescripted module has a specified service in its interfaces, and you want to check that the services defined as interfaces of the module are consistent with those defined in the Module jar file manifest.

See also


Categories: concepts | development

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence