org.apache.tika.config
Class ServiceLoader
java.lang.Object
org.apache.tika.config.ServiceLoader
public class ServiceLoader
- extends java.lang.Object
Internal utility class that Tika uses to look up service providers.
- Since:
- Apache Tika 0.9
Method Summary |
|
loadServiceProviders(java.lang.Class<T> service)
Returns all the available service providers of the given type. |
static void |
setContextClassLoader(java.lang.ClassLoader loader)
Sets the context class loader to use for all threads that access
this class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceLoader
public ServiceLoader(java.lang.ClassLoader loader,
LoadErrorHandler handler)
ServiceLoader
public ServiceLoader(java.lang.ClassLoader loader)
ServiceLoader
public ServiceLoader()
setContextClassLoader
public static void setContextClassLoader(java.lang.ClassLoader loader)
- Sets the context class loader to use for all threads that access
this class. Used for example in an OSGi environment to avoid problems
with the default context class loader.
- Parameters:
loader
- default context class loader,
or null
to automatically pick the loader
loadServiceProviders
public <T> java.util.List<T> loadServiceProviders(java.lang.Class<T> service)
- Returns all the available service providers of the given type.
- Parameters:
service
- service provider interface
- Returns:
- available service providers
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.