org.apache.myfaces.extensions.cdi.core.impl.provider
Class SimpleServiceProvider<T>

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider<T>
      extended by org.apache.myfaces.extensions.cdi.core.impl.provider.SimpleServiceProvider<T>
Direct Known Subclasses:
DefaultServiceProvider

@Typed
@InvocationOrder(value=100)
public class SimpleServiceProvider<T>
extends ServiceProvider<T>

Simple ServiceProvider which allows to use the service-loader pattern with Java 1.5


Field Summary
protected  List<Class<?>> foundServiceClasses
           
 
Fields inherited from class org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
FILE_ENCODING, SERVICE_CONFIG, SERVICE_PROVIDER_CLASS, SERVICE_PROVIDER_CONTEXT_CLASS, serviceProviderContext, serviceType
 
Constructor Summary
protected SimpleServiceProvider(Class<T> serviceType, ServiceProviderContext serviceProviderContext)
           
 
Method Summary
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()
          
 
Methods inherited from class org.apache.myfaces.extensions.cdi.core.api.provider.ServiceProvider
createServiceProviderContext, loadServices, loadServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

foundServiceClasses

protected List<Class<?>> foundServiceClasses
Constructor Detail

SimpleServiceProvider

protected SimpleServiceProvider(Class<T> serviceType,
                                ServiceProviderContext serviceProviderContext)
Method Detail

loadServiceImplementations

protected List<T> loadServiceImplementations()

Specified by:
loadServiceImplementations in class ServiceProvider<T>

resolveServiceImplementations

protected List<Class<?>> resolveServiceImplementations()

getConfigFileList

protected List<URL> getConfigFileList()

getConfigFileLocation

protected String getConfigFileLocation()

loadConfiguredServices

protected void loadConfiguredServices(URL serviceFile)

extractConfiguredServiceClassName

protected String extractConfiguredServiceClassName(String currentConfigLine)

loadService

protected void loadService(String serviceClassName)

isServiceSupported

protected boolean isServiceSupported(Class<T> serviceClass)

loadClass

protected Class<? extends T> loadClass(String serviceClassName)

loadClassForName

protected static Class<?> loadClassForName(String serviceClassName,
                                           ClassLoader classLoader)

createInstance

protected T createInstance(Class<?> serviceClass)

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.