@Typed @InvocationOrder(value=100) public class SimpleServiceProvider<T> extends ServiceProvider<T>
ServiceProvider
which allows to use the service-loader pattern with Java 1.5Modifier and Type | Field and Description |
---|---|
protected List<Class<?>> |
foundServiceClasses |
FILE_ENCODING, SERVICE_CONFIG, SERVICE_PROVIDER_CLASS, SERVICE_PROVIDER_CONTEXT_CLASS, serviceProviderContext, serviceType
Modifier | Constructor and Description |
---|---|
protected |
SimpleServiceProvider(Class<T> serviceType,
ServiceProviderContext serviceProviderContext) |
Modifier and Type | Method and Description |
---|---|
protected T |
createInstance(Class<?> serviceClass) |
protected String |
extractConfiguredServiceClassName(String currentConfigLine) |
protected List<URL> |
getConfigFileList() |
protected String |
getConfigFileLocation() |
protected boolean |
isServiceSupported(Class<T> serviceClass) |
protected Class<? extends T> |
loadClass(String serviceClassName) |
protected static Class<?> |
loadClassForName(String serviceClassName,
ClassLoader classLoader) |
protected void |
loadConfiguredServices(URL serviceFile) |
protected void |
loadService(String serviceClassName) |
protected List<T> |
loadServiceImplementations() |
protected List<Class<?>> |
resolveServiceImplementations() |
String |
toString() |
createServiceProviderContext, loadServices, loadServices
protected SimpleServiceProvider(Class<T> serviceType, ServiceProviderContext serviceProviderContext)
protected List<T> loadServiceImplementations()
loadServiceImplementations
in class ServiceProvider<T>
protected String getConfigFileLocation()
protected void loadConfiguredServices(URL serviceFile)
protected String extractConfiguredServiceClassName(String currentConfigLine)
protected void loadService(String serviceClassName)
protected static Class<?> loadClassForName(String serviceClassName, ClassLoader classLoader)
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.