org.apache.webbeans.corespi
Class ServiceLoader
java.lang.Object
org.apache.webbeans.corespi.ServiceLoader
public class ServiceLoader
- extends Object
Loads any Service Provider Interface implementation declared in the
OpenWebBeansConfiguration.
The Configuration for Services looks like
org.apache.webbeans.corespi.MyServiceInterface=my.package.webbeans.spi.MyServiceImplementation
|
Method Summary |
static
|
getService(Class<T> serviceInterface)
Get a new service singleton instance for the given interface. |
static
|
getService(Class<T> serviceInterface,
ClassLoader cl)
Get a new service singleton instance for the given interface. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceLoader
public ServiceLoader()
getService
public static <T> T getService(Class<T> serviceInterface)
- Get a new service singleton instance for the given interface.
- Parameters:
serviceInterface -
- Returns:
- the new service implementation
getService
public static <T> T getService(Class<T> serviceInterface,
ClassLoader cl)
- Get a new service singleton instance for the given interface.
- Parameters:
serviceInterface - classloader - to be used for lookup
- Returns:
- the new service implementation
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.