java.lang.Object
javax.xml.ws.spi.FactoryFinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ServiceLoaderUtil.ExceptionHandler<WebServiceException>
private static final Logger
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> T
Finds the implementationClass
object for the given factory name, or if that fails, finds theClass
object for the given fallback class name.private static Object
fromJDKProperties
(String factoryId, String fallbackClassName, ClassLoader classLoader) private static Object
fromSystemProperty
(String factoryId, String fallbackClassName, ClassLoader classLoader) private static boolean
isOsgi()
private static Object
lookupUsingOSGiServiceLoader
(String factoryId)
-
Field Details
-
logger
-
EXCEPTION_HANDLER
-
OSGI_SERVICE_LOADER_CLASS_NAME
- See Also:
-
-
Constructor Details
-
FactoryFinder
FactoryFinder()
-
-
Method Details
-
find
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 Object fromSystemProperty(String factoryId, String fallbackClassName, ClassLoader classLoader) -
fromJDKProperties
private static Object fromJDKProperties(String factoryId, String fallbackClassName, ClassLoader classLoader) -
isOsgi
private static boolean isOsgi() -
lookupUsingOSGiServiceLoader
-