All Downloads are FREE. Search and download functionalities are using the official Maven repository.

info.xiancloud.core.distribution.IRegistry Maven / Gradle / Ivy

The newest version!
package info.xiancloud.core.distribution;

import info.xiancloud.core.init.Destroyable;
import info.xiancloud.core.init.Initable;
import info.xiancloud.core.util.Reflection;

import java.util.List;

/**
 * @author happyyangyuan
 * 注册中心规范接口;
 * 单例,插件必须提供实现;
 */
public interface IRegistry extends Initable, Destroyable {

    List registries = Reflection.getSubClassInstances(IRegistry.class);

    /**
     * 单例
     */
    IRegistry singleton = registries.isEmpty() ? null : registries.get(0);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy