use of com.alipay.sofa.ark.spi.model.Plugin in project sofa-ark by sofastack.
the class PluginManagerServiceImpl method getPluginsInOrder.
@Override
public List<Plugin> getPluginsInOrder() {
List<Plugin> pluginList = new ArrayList<>(plugins.values());
Collections.sort(pluginList, new OrderComparator());
return pluginList;
}
use of com.alipay.sofa.ark.spi.model.Plugin in project sofa-ark by sofastack.
the class ClassLoaderServiceImpl method prepareExportClassAndResourceCache.
@Override
public void prepareExportClassAndResourceCache() {
for (Plugin plugin : pluginManagerService.getPluginsInOrder()) {
for (String exportIndex : plugin.getExportPackageNodes()) {
exportNodeAndClassLoaderMap.putIfAbsent(exportIndex, plugin.getPluginClassLoader());
}
for (String exportIndex : plugin.getExportPackageStems()) {
exportStemAndClassLoaderMap.putIfAbsent(exportIndex, plugin.getPluginClassLoader());
}
for (String exportIndex : plugin.getExportClasses()) {
exportClassAndClassLoaderMap.putIfAbsent(exportIndex, plugin.getPluginClassLoader());
}
for (String resource : plugin.getExportResources()) {
exportResourceAndClassLoaderMap.putIfAbsent(resource, new LinkedList<>());
exportResourceAndClassLoaderMap.get(resource).add(plugin.getPluginClassLoader());
}
for (String resource : plugin.getExportPrefixResourceStems()) {
exportPrefixStemResourceAndClassLoaderMap.putIfAbsent(resource, new LinkedList<>());
exportPrefixStemResourceAndClassLoaderMap.get(resource).add(plugin.getPluginClassLoader());
}
for (String resource : plugin.getExportSuffixResourceStems()) {
exportSuffixStemResourceAndClassLoaderMap.putIfAbsent(resource, new LinkedList<>());
exportSuffixStemResourceAndClassLoaderMap.get(resource).add(plugin.getPluginClassLoader());
}
}
}
Aggregations