|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.ws.api.util.ServiceLoader
public final class ServiceLoader
Load a service class of a given name using this ordered lookup procedure:
Method Summary | |
---|---|
static Object |
loadService(String propertyName,
String defaultFactory)
This method uses the algorithm below using the JAXWS Provider as an example. |
static Object |
loadService(String propertyName,
String defaultFactory,
ClassLoader cl)
This method uses the algorithm below using the JAXWS Provider as an example. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Object loadService(String propertyName, String defaultFactory, ClassLoader cl)
1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the java.util.Properties.load(InputStream) method and it contains an entry whose key is javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class. 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used as the name of the implementation class. 4. Finally, a default implementation class name is used.
propertyName
- The property name for the service to resolvedefaultFactory
- Default factory class name to be used when not able to resolve anythingcl
- The classLoader to be used for loading resolved service
public static Object loadService(String propertyName, String defaultFactory)
1. If a resource with the name of META-INF/services/javax.xml.ws.spi.Provider exists, then its first line, if present, is used as the UTF-8 encoded name of the implementation class. 2. If the ${java.home}/lib/jaxws.properties file exists and it is readable by the java.util.Properties.load(InputStream) method and it contains an entry whose key is javax.xml.ws.spi.Provider, then the value of that entry is used as the name of the implementation class. 3. If a system property with the name javax.xml.ws.spi.Provider is defined, then its value is used as the name of the implementation class. 4. Finally, a default implementation class name is used.This is equivalent to calling
loadService(String propertyName, String defaultFactory, ClassLoader cl)
passing in the Thread.currentThread().getContextClassLoader().
propertyName
- The property name for the service to resolvedefaultFactory
- Default factory class name to be used when not able to resolve anything
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |