Class ServiceFactory
java.lang.Object
com.aquima.interactions.framework.service.ServiceFactory
- All Implemented Interfaces:
IServiceFactory
Service factory, with constructor based creation.
- Since:
- 5.1
- Author:
- F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionServiceFactory
(Map<String, IService> services) Constructs a service factory with a map of key=servicetype and value IService instances. -
Method Summary
Modifier and TypeMethodDescriptiongetService
(ApplicationID id, String serviceTypeName) This method should provide an implementation of the service interface for the specified name and application id.
-
Constructor Details
-
ServiceFactory
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
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 interfaceIServiceFactory
- 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.
-