- 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_HANDLER
private static java.util.logging.Logger
logger
private static java.lang.String
OSGI_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> T
find(java.lang.Class<T> factoryClass, java.lang.String fallbackClassName)
Finds the implementationClass
object for the given factory name, or if that fails, finds theClass
object for the given fallback class name.private static java.lang.Object
fromJDKProperties(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)
private static java.lang.Object
fromSystemProperty(java.lang.String factoryId, java.lang.String fallbackClassName, java.lang.ClassLoader classLoader)
private static boolean
isOsgi()
private static java.lang.Object
lookupUsingOSGiServiceLoader(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 implementationClass
object for the given factory name, or if that fails, finds theClass
object 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;null
to indicate that there is no fallback class name- Returns:
- the
Class
object 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)
-
-