java.lang.Object
javax.xml.soap.FactoryFinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ServiceLoaderUtil.ExceptionHandler<SOAPException>private static final Loggerprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> T(package private) static <T> Tfind(Class<T> factoryClass, String defaultClassName, boolean tryFallback, String deprecatedFactoryId) Finds the implementationClassobject for the given factory type.private static StringfromJDKProperties(String factoryId, String deprecatedFactoryId) private static StringfromMetaInfServices(String deprecatedFactoryId, ClassLoader tccl) private static StringfromSystemProperty(String factoryId, String deprecatedFactoryId) private static StringgetSystemProperty(String property) private static booleanisOsgi()private static voidprivate static ObjectlookupUsingOSGiServiceLoader(String factoryId) private static ObjectnewInstance(String className, String defaultClassName, ClassLoader tccl)
-
Field Details
-
logger
-
EXCEPTION_HANDLER
-
OSGI_SERVICE_LOADER_CLASS_NAME
- See Also:
-
-
Constructor Details
-
FactoryFinder
FactoryFinder()
-
-
Method Details
-
find
static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback, String deprecatedFactoryId) throws SOAPException Finds the implementationClassobject for the given factory type. If it fails andtryFallbackistruefinds theClassobject 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;nullto indicate that there is no default class nametryFallback- whether to try the default class as a fallback- Returns:
- the
Classobject of the specified message factory; may not benull - Throws:
SOAPException- if there is a SOAP error
-
find
static <T> T find(Class<T> factoryClass, String defaultClassName, boolean tryFallback) throws SOAPException - Throws:
SOAPException
-
newInstance
private static Object newInstance(String className, String defaultClassName, ClassLoader tccl) throws SOAPException - Throws:
SOAPException
-
fromMetaInfServices
-
fromJDKProperties
-
fromSystemProperty
-
getSystemProperty
-
logFound
-
isOsgi
private static boolean isOsgi() -
lookupUsingOSGiServiceLoader
-