Class ServiceFactory

java.lang.Object
com.aquima.interactions.framework.service.ServiceFactory
All Implemented Interfaces:
IServiceFactory

public class ServiceFactory extends Object implements IServiceFactory
Service factory, with constructor based creation.
Since:
5.1
Author:
F. van der Meer
  • Constructor Details

    • ServiceFactory

      public ServiceFactory(Map<String,IService> services)
      Constructs a service factory with a map of key=servicetype and value IService instances. (This factory does not support versioning and such.)
      Parameters:
      services - a map of servicetype to service implementation
  • Method Details

    • getService

      public IService getService(ApplicationID id, String serviceTypeName)
      Description copied from interface: IServiceFactory
      This method should provide an implementation of the service interface for the specified name and application id. The name passed to this method will be the service-type name as specified in the studio. When service could not be created the factory should throw an exception, when the service could not be found a null pointer should be returned.
      Specified by:
      getService in interface IServiceFactory
      Parameters:
      id - The ID of the application module for which a service is requested.
      serviceTypeName - the service-type name
      Returns:
      the service interface which should be returned, null when not available.