Generating Code for Service Providers

In addition to services and components JEAF also offers an additional mechanism to support technical services, so called Service Providers.

The diagram above shows the output that is generated by JEAF Generator for service providers (stereotype «JEAFServiceProvider») and service provider implementations (stereotype «JEAFServiceProviderImpl»):

  • Service Provider Interface (MailServiceProvider)
    For every service provider from the UML model a service provider interface will be generated. This Java interface define the interface of the service provider. As it’s not intended to be edited manually it will be written to slot src-gen.

  • Service Provider Base Class (MailServiceProviderImplBase)
    The service provider base class contains all the things that can be generated like access methods for configuration values. As the class is not intended to be edited manually it will be written to slot src-gen.

  • Service Provider Implementation (MailServiceProviderImpl)
    Service provider implementation is a direct subclass of the generated base class. This is the class where the acutal implementation of the service provider should be done and so it will be written to src.

  • Service Provider Factory (MailServiceProviderFactory)
    Service Provider Factory class is required by JEAF Core to create new instances of the service provider. As the class is not intended to be edited manually it will be written to slot src-gen.

 

For further information please also refer to:

Source Code Examples