- java.lang.Object
-
- javax.xml.soap.FactoryFinder
-
class FactoryFinder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static ServiceLoaderUtil.ExceptionHandler<SOAPException>
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 defaultClassName, boolean tryFallback)
(package private) static <T> T
find(java.lang.Class<T> factoryClass, java.lang.String defaultClassName, boolean tryFallback, java.lang.String deprecatedFactoryId)
Finds the implementationClass
object for the given factory type.private static java.lang.String
fromJDKProperties(java.lang.String factoryId, java.lang.String deprecatedFactoryId)
private static java.lang.String
fromMetaInfServices(java.lang.String deprecatedFactoryId, java.lang.ClassLoader tccl)
private static java.lang.String
fromSystemProperty(java.lang.String factoryId, java.lang.String deprecatedFactoryId)
private static java.lang.String
getSystemProperty(java.lang.String property)
private static boolean
isOsgi()
private static void
logFound(java.lang.String value)
private static java.lang.Object
lookupUsingOSGiServiceLoader(java.lang.String factoryId)
private static java.lang.Object
newInstance(java.lang.String className, java.lang.String defaultClassName, java.lang.ClassLoader tccl)
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
EXCEPTION_HANDLER
private static final ServiceLoaderUtil.ExceptionHandler<SOAPException> 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 defaultClassName, boolean tryFallback, java.lang.String deprecatedFactoryId) throws SOAPException
Finds the implementationClass
object for the given factory type. If it fails andtryFallback
istrue
finds theClass
object for the given default class name. The arguments supplied must be used in order Note the default class name may be needed even if fallback is not to be attempted in order to check if requested type is fallback.This method is package private so that this code can be shared.
- Parameters:
factoryClass
- factory abstract class or interface to be founddeprecatedFactoryId
- deprecated name of a factory; it is used for types where class name is different from a name being searched (in previous spec).defaultClassName
- the implementation class name, which is to be used only if nothing else is found;null
to indicate that there is no default class nametryFallback
- whether to try the default class as a fallback- Returns:
- the
Class
object of the specified message factory; may not benull
- Throws:
SOAPException
- if there is a SOAP error
-
find
static <T> T find(java.lang.Class<T> factoryClass, java.lang.String defaultClassName, boolean tryFallback) throws SOAPException
- Throws:
SOAPException
-
newInstance
private static java.lang.Object newInstance(java.lang.String className, java.lang.String defaultClassName, java.lang.ClassLoader tccl) throws SOAPException
- Throws:
SOAPException
-
fromMetaInfServices
private static java.lang.String fromMetaInfServices(java.lang.String deprecatedFactoryId, java.lang.ClassLoader tccl)
-
fromJDKProperties
private static java.lang.String fromJDKProperties(java.lang.String factoryId, java.lang.String deprecatedFactoryId)
-
fromSystemProperty
private static java.lang.String fromSystemProperty(java.lang.String factoryId, java.lang.String deprecatedFactoryId)
-
getSystemProperty
private static java.lang.String getSystemProperty(java.lang.String property)
-
logFound
private static void logFound(java.lang.String value)
-
isOsgi
private static boolean isOsgi()
-
lookupUsingOSGiServiceLoader
private static java.lang.Object lookupUsingOSGiServiceLoader(java.lang.String factoryId)
-
-