The loading container for extension points, capable of loading extension points from different containers.
org.apache.dubbo.common.extension.ExtensionFactory
<dubbo:application compiler="jdk" />
org.apache.dubbo.common.extension.factory.SpiExtensionFactory
org.apache.dubbo.config.spring.extension.SpringExtensionFactory
Maven project structure:
src
|-main
|-java
|-com
|-xxx
|-XxxExtensionFactory.java (implements ExtensionFactory interface)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.common.extension.ExtensionFactory (plain text file, content: xxx=com.xxx.XxxExtensionFactory)
XxxExtensionFactory.java:
package com.xxx;
import org.apache.dubbo.common.extension.ExtensionFactory;
public class XxxExtensionFactory implements ExtensionFactory {
public Object getExtension(Class<?> type, String name) {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.common.extension.ExtensionFactory:
xxx=com.xxx.XxxExtensionFactory