public class ServiceFinder extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ServiceFinder.Module
The module containing the services.
|
Constructor and Description |
---|
ServiceFinder(Class serviceType)
Constructor.
|
ServiceFinder(String serviceName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSearchPath(Path path)
Adds a search (directory) path.
|
void |
addSearchPaths(Path... paths)
Adds search (directory) paths.
|
void |
addSearchPathsFromPreferences(String key)
Adds search paths from user preferences.
|
void |
addSearchPathsFromPreferences(String configName,
String key)
Adds search paths from user preferences.
|
List<ServiceFinder.Module> |
findServices()
Finds services based on the current search path configuration.
|
List<Path> |
getSearchPaths() |
String |
getServicesPath() |
boolean |
getUseClassPath() |
boolean |
getUseZipFiles() |
void |
searchClassPath(boolean value)
Deprecated.
|
void |
setUseClassPath(boolean value) |
void |
setUseZipFiles(boolean value) |
public ServiceFinder(Class serviceType)
serviceType
- The service type or service provider interface (SPI).public ServiceFinder(String serviceName)
serviceName
- The service's name.public String getServicesPath()
public boolean getUseClassPath()
true
if this ServiceFinder uses the JVM's class path´to find modules.public void setUseClassPath(boolean value)
value
- If true
, the JVM's class path shall be searched as wellpublic boolean getUseZipFiles()
true
if this ServiceFinder uses the JVM's class path to find modules.public void setUseZipFiles(boolean value)
value
- If true
, any ZIP and JAR files are searched as wellpublic void addSearchPath(Path path)
path
- A search path.public void addSearchPaths(Path... paths)
paths
- The search paths.public void addSearchPathsFromPreferences(String configName, String key)
configName
- The configuration name.key
- The user preferences key.public void addSearchPathsFromPreferences(String key)
key
- The user preferences key.public List<ServiceFinder.Module> findServices()
@Deprecated public void searchClassPath(boolean value)
Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.