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

net.happyonroad.component.container.MutableServiceRegistry Maven / Gradle / Ivy

Go to download

The spring component framework is used to setup a plugin based, micro-kernel, standalone application (today, we will support webapp in later releases) which is based on SpringFramework. It can help you decouple your application into several components clearly with zero invasion and keep your application consistent between develop time and runtime.

The newest version!
/**
 * @author XiongJie, Date: 13-10-29
 */

package net.happyonroad.component.container;

import java.util.Map;

/** 可修改的服务注册表 */
public interface MutableServiceRegistry extends ServiceRegistry {

    /**
     * 以默认的hint注册服务的实现
     *
     * @param interfaceClass 服务接口
     * @param service        服务实例
     * @param             服务类型
     */
     void register(Class interfaceClass, T service);

    /**
     * 以特定的hint注册服务的实现
     *
     * @param interfaceClass 服务接口
     * @param service        服务实例
     * @param             服务类型
     * @param hint           服务备注
     */
     void register(Class interfaceClass, T service, String hint);


    /**
     * 取消特定的hint服务的注册
     *
     * @param interfaceClass 服务接口
     * @param             服务类型
     * @param hint           服务备注
     * @return 先前注册的服务对象,如果没有注册过,则返回null
     */
     T unRegister(Class interfaceClass, String hint);

    /**
     * 取消所有特定服务接口的实现
     *
     * @param interfaceClass 服务接口
     * @param             服务类型
     * @return 所有的服务,如果不存在,也会返回一个空的list
     */
     Map unRegister(Class interfaceClass);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy