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

Checking services existence



In some cases, it is useful to check that a module has a specified service in its interfaces. It is useful if the module is an autodescripted module 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.

This article explains how to check for the existence and consistency of services in the Modules code.

Low level usage

Main Article: ServiceTemplate usage

The ServiceTemplates class allows to get the definition of the services defined in the autodescripted module manifest, and check the compatibility of a Service with the stored definition.

High level usage


The OptionalServicesConfigurator class allows to get the services which are consistent to a template declaration in a module:
  • If it returns null for a Service, it means that this service is not present or not compatible with its template declaration
  • If it returns a not null value for a Service, it means that this service is present and is compatible with its template declaration

See also


Categories: concepts

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