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

net.happyonroad.component.container.ServiceRegistry 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 ServiceRegistry {
    final String DEFAULT_HINT = "default";
    final String ANY_HINT = "*";
    /**
     * 获得服务接口的缺省服务对象(hint = *)
     *
     * @param requiredType 服务的接口
     * @param           服务的类型
     * @return 服务实例
     */
     T getService(Class requiredType);

    /**
     * 获得某个服务接口的服务对象
     *
     * @param requiredType 服务的接口
     * @param           服务的类型
     * @param hint         服务的题注
     * @return 服务实例,如果存在多个,则返回第一个
     */
     T getService(Class requiredType, String hint);

    /**
     * 获得某个服务接口所有的实例对象
     *
     * @param requiredType 服务的接口
     * @param           服务的类型
     * @return 所有服务实例
     */
     Map getServices(Class requiredType);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy