ExtensionFactory Extension
Summary
Factory to load dubbo extensions.
Extension Interface
org.apache.dubbo.common.extension.ExtensionFactory
Extension Configuration
<dubbo:application compiler="jdk" />
Existing Extension
org.apache.dubbo.common.extension.factory.SpiExtensionFactory
org.apache.dubbo.config.spring.extension.SpringExtensionFactory
Extension Guide
Directory layout:
src
|-main
|-java
|-com
|-xxx
|-XxxExtensionFactory.java (ExtensionFactory implementation)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.common.extension.ExtensionFactory (plain text file with the 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
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified January 22, 2021: Merge branch 'master' of https://github.com/apache/dubbo-website (f48eac9)