Package ej.service.loader
Class FilePropertiesServiceLoader
- java.lang.Object
-
- ej.service.loader.SimpleServiceLoader
-
- ej.service.loader.DependencyInjectionServiceLoader
-
- ej.service.loader.FilePropertiesServiceLoader
-
- All Implemented Interfaces:
ServiceLoader
public class FilePropertiesServiceLoader extends DependencyInjectionServiceLoader
Service loader that retrieves services implementations from a property file.
-
-
Field Summary
-
Fields inherited from class ej.service.loader.SimpleServiceLoader
services
-
-
Constructor Summary
Constructors Constructor Description FilePropertiesServiceLoader(String path)Creates a file properties service loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetImplementationName(String serviceName)Gets the implementation class name for the given service name.-
Methods inherited from class ej.service.loader.DependencyInjectionServiceLoader
createAlternativeImplementation
-
Methods inherited from class ej.service.loader.SimpleServiceLoader
checkServicePermission, getService, putService
-
-
-
-
Constructor Detail
-
FilePropertiesServiceLoader
public FilePropertiesServiceLoader(String path)
Creates a file properties service loader.- Parameters:
path- the properties file path.
-
-
Method Detail
-
getImplementationName
@Nullable protected String getImplementationName(String serviceName)
Description copied from class:DependencyInjectionServiceLoaderGets the implementation class name for the given service name.- Specified by:
getImplementationNamein classDependencyInjectionServiceLoader- Parameters:
serviceName- the service name.- Returns:
- the implementation class name, or
nullif none.
-
-