org.zodiac.plugin.factory.PluginRegistryInfo Maven / Gradle / Ivy
package org.zodiac.plugin.factory;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
import org.pf4j.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
import org.zodiac.commons.util.Colls;
import org.zodiac.plugin.factory.process.pipe.PluginInfoContainers;
import org.zodiac.plugin.factory.process.pipe.loader.ResourceWrapper;
import org.zodiac.plugin.integration.IntegrationConfiguration;
import org.zodiac.plugin.realize.BasePlugin;
import org.zodiac.sdk.toolkit.util.collection.CollUtil;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
/**
* 注册的插件信息。
*/
public class PluginRegistryInfo {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
private final PluginWrapper pluginWrapper;
private final PluginManager pluginManager;
private final IntegrationConfiguration configuration;
private final GenericApplicationContext mainApplicationContext;
private final GenericApplicationContext pluginApplicationContext;
private final Binder pluginBinder;
private final SpringBeanRegister springBeanRegister;
/**
* 是否跟随主程序启动而初始化
*/
private final boolean followingInitial;
private final BasePlugin basePlugin;
/**
* 扩展存储项
*/
private final Map extensionMap = CollUtil.concurrentMap();
/**
* 插件中的配置单例bean
*/
private final Set