Package javax.xml.ws.spi
Class FactoryFinder
- java.lang.Object
-
- javax.xml.ws.spi.FactoryFinder
-
class FactoryFinder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static ServiceLoaderUtil.ExceptionHandler<WebServiceException>EXCEPTION_HANDLERprivate static java.util.logging.Loggerloggerprivate static java.lang.StringOSGI_SERVICE_LOADER_CLASS_NAME
-
Constructor Summary
Constructors Constructor Description FactoryFinder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static <T> Tfind(java.lang.Class<T> factoryClass, java.lang.String fallbackClassName)Finds the implementationClassobject for the given factory name, or if that fails, finds theClassobject for the given fallback class name.private static java.lang.ObjectfromJDKProperties(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)private static java.lang.ObjectfromSystemProperty(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)private static booleanisOsgi()private static java.lang.ObjectlookupUsingOSGiServiceLoader(java.lang.String factoryId)
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
EXCEPTION_HANDLER
private static final ServiceLoaderUtil.ExceptionHandler<WebServiceException> EXCEPTION_HANDLER
-
OSGI_SERVICE_LOADER_CLASS_NAME
private static final java.lang.String OSGI_SERVICE_LOADER_CLASS_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
find
static <T> T find(java.lang.Class<T> factoryClass, java.lang.String fallbackClassName)Finds the implementationClassobject for the given factory name, or if that fails, finds theClassobject for the given fallback class name. The arguments supplied MUST be used in order. If using the first argument is successful, the second one will not be used.This method is package private so that this code can be shared.
- Parameters:
factoryClass- the name of the factory to find, which is a system propertyfallbackClassName- the implementation class name, which is to be used only if nothing else is found;nullto indicate that there is no fallback class name- Returns:
- the
Classobject of the specified message factory; may not benull - Throws:
WebServiceException- if there is an error
-
fromSystemProperty
private static java.lang.Object fromSystemProperty(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)
-
fromJDKProperties
private static java.lang.Object fromJDKProperties(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)
-
isOsgi
private static boolean isOsgi()
-
lookupUsingOSGiServiceLoader
private static java.lang.Object lookupUsingOSGiServiceLoader(java.lang.String factoryId)
-
-