| java.lang.Object clime.messadmin.providers.Service
Service | final public class Service (Code) | | From JDK 1.3.1 / 1.4.2 / 1.5.0
see http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider
see javax.imageio.spi.ServiceRegistry (Java 1.4+)
see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4640520
see http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html (Java 6)
author: Cédrik LIME |
Method Summary | |
protected static void | fail(Class class1, String s) | protected static void | fail(Class class1, URL url, int i, String s) | protected static void | fail(Class class1, String s, Throwable throwable) | public static Iterator | installedProviders(Class service) Lazily locates and instantiates the available providers for the given service class, using the extension class loader.
This convenience method simply locates the extension class loader,
call it extClassLoader, and then returns
Service.lookup(service, extClassLoader)
If the extension class loader cannot be found then the system class
loader is used; if there is no system class loader then the bootstrap
class loader is used.
This method is intended for use when only installed providers are
desired. | protected static Iterator | parse(Class class1, URL url, Set set) | public static Iterator | providers(Class service, ClassLoader loader) Lazily locates and instantiates the available providers for the given service class and class loader. | public static Iterator | providers(Class service) Lazily locates and instantiates the available providers for the given service class, using the current thread's context class loader. |
installedProviders | public static Iterator installedProviders(Class service) throws ServiceConfigurationError(Code) | | Lazily locates and instantiates the available providers for the given service class, using the extension class loader.
This convenience method simply locates the extension class loader,
call it extClassLoader, and then returns
Service.lookup(service, extClassLoader)
If the extension class loader cannot be found then the system class
loader is used; if there is no system class loader then the bootstrap
class loader is used.
This method is intended for use when only installed providers are
desired. The resulting service will only find and load providers that
have been installed into the current Java virtual machine; providers on
the application's class path will be ignored.
Parameters: service - The interface or abstract class representing this service An iterator that lazily locates and instantiates providers for this service throws: ServiceConfigurationError - |
providers | public static Iterator providers(Class service, ClassLoader loader) throws ServiceConfigurationError(Code) | | Lazily locates and instantiates the available providers for the given service class and class loader.
Parameters: service - The interface or abstract class representing this service Parameters: loader - The class loader to be used to load provider-configuration files and provider classes, or null if the system class loader (or, failing that, the bootstrap class loader) is to be used An iterator that lazily locates and instantiates providers for this service throws: ServiceConfigurationError - |
providers | public static Iterator providers(Class service) throws ServiceConfigurationError(Code) | | Lazily locates and instantiates the available providers for the given service class, using the current thread's context class loader.
An invocation of this convenience method of the form
Service.lookup(service)
is equivalent to
Service.lookup(service,
Thread.currentThread().getContextClassLoader())
Parameters: service - The interface or abstract class representing this service An iterator that lazily locates and instantiates providers for this service throws: ServiceConfigurationError - |
|
|