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

Application types



Application types are jar files which not only contain the code of an application, but also XML files which define for this application[1]
These XML files are refered in the application Manifest
:
  • The application implementation of the application
  • The services used by the application (for both subscribed or provided services)
  • The data data types defined for the application
This configuration allows to create instances of the application without having to define in each instance elements such as:

Manifest properties

Main Article: Manifest properties

The manifest of the application jar file can contain the following manifest properties:

Using application types

Referring to an application type does not need any specific declaration, appart from pointing to the application type jar file.

Note that you don't need to use the same name for your application instance as for your application type. The framework will correctly use the name of the application instance with the content of the used application type.

Extending the application type declaration

You can use the application type without adding anything to its declaration. For example if myAppliType.jar contains a type declaration:
      <application name="appli1">
         <deployment>
            <lib url="myAppliType.jar" />
         </deployment>
      </application>
Then the full content of the myAppliType.jar type will be used in the instance.

But you can also declare services interfaces for the instance. This can be useful if the application type can process any services. In that case you will have to declare the module defined in the application type in the instance declaration and just specify the services you interface to:
      <application name="appli1">
         <deployment>
            <lib url="myAppliType.jar" />
         </deployment>
         <modules>
            <module name="theModule"> 
               <interfaces>
                  <push service="service1"/>
                  <subscribe service="service2" />
               </interfaces> 
            </module> 
         </modules>
      </application>

Using application type types and services

The framework types compatibility will ensure that if a type is defined per the application type manifest declaration:
      Types: org/da/myappli/types.xml
and through the types declared in the parent instance, then they will be compatible.

Usage example

For example, suppose that we have an application type stored in a myAppliType.jar jar file containing a specific modules definition:
      Modules: org/da/myappli/applicationType.xml
and the following applicationType.xml content:
      <application name="myAppliType">
         <modules>
            <module name="theModule"> 
               <implementation path="org.da.TheModule" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
               </implementation>                     
            </module>
         </modules>
      </application>
Then the following application.xml declaration will refer to this declaration type:
      <application name="appli1">
         <deployment>
            <lib url="myAppliType.jar" />
         </deployment>
         <modules>
            <module name="theModule"> 
               <interfaces>
                  <push service="service1"/>
                  <subscribe service="service2" />
               </interfaces> 
            </module> 
         </modules>
      </application>
This declaration will be equivalent to the following application declaration:
      <application name="appli1">
         <deployment>
            <lib url="myAppliType.jar" />
         </deployment>
         <modules>
            <module name="theModule"> 
               <implementation path="org.da.TheModule" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
               </implementation>              
               <interfaces>
                  <push service="service1"/>
                  <subscribe service="service2" />
               </interfaces> 
            </module> 
         </modules>
      </application>

Notes

  1. ^ These XML files are refered in the application Manifest

See also


Categories: concepts

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