The invention discloses a method to realize Autofac support service manager needs to be loaded on the realization process is as follows: the segmentation task into several sub tasks, and the data set is divided into several pieces of data, according to the construction of a parallel execution of independent sub tasks packet split each sub task and the corresponding the data parallel execution of these tasks into the package unified thread pool for independent. The invention provides an implementation method of a service manager based on Autofac supporting on-demand loading, which can make full use of the resources of the existing system and improve the performance of batch processing as compared with the prior art. In the process of parallel execution, by executing the status and error information of the sub task, the data execution state and the error information, the task execution process is tracked and fault-tolerant, and the utility model has the advantages of high practicability and wide application range.
【技术实现步骤摘要】
一种基于Autofac支持按需加载的服务管理器的实现方法
本专利技术涉及计算机
,具体地说是一种基于Autofac支持按需加载的服务管理器的实现方法。
技术介绍
智能客户端(SmartClient)技术是一种基于互联网(Internet)的富客户端技术。在客户端,采用富客户端(RichClient)技术,可充分利用客户端机器的本地资源,为用户提供丰富的用户交互体验。与B/S(Browser/Server,浏览器/服务器)应用程序相比,可展现给用户的界面是像安装在本地桌面系统上的GUI(GraphicsUserInterface,图形用户界面)程序界面,它有很多的复杂界面交互元素如树、菜单、网格等,对用户的友好性和可交互性大大增强,可满足用户界面交互的各种个性化需求,并且可提供本地数据缓存、离线应用等强大功能。而与C/S(Client/Server,客户机/服务器)应用程序对比,智能客户端技术提供客户端程序的自动部署更新,避免了客户端程序维护的各种繁琐和困难。智能客户端技术提供客户端程序的自动部署更新,避免了客户端程序维护的各种繁琐和困难,也为程序带来了其它方 ...
【技术保护点】
一种基于Autofac支持按需加载的服务管理器的实现方法,其特征在于,基于Autofac解耦框架、服务管理器,实现适合于智能客户端支持按需加载的服务管理器,其实现过程为:一、首先配置服务管理器的服务接口‑实现类,使得编程时,不同模块间程序依赖接口,不直接依赖具体的实现类;二、然后动态注册服务及解析实例:加载服务管理器配置项,判断服务管理器的服务类型是否已注册;如果已注册,或未注册并进行注册完成后,调用Autofac的Resolve方法获取对象实例。
【技术特征摘要】
1.一种基于Autofac支持按需加载的服务管理器的实现方法,其特征在于,基于Autofac解耦框架、服务管理器,实现适合于智能客户端支持按需加载的服务管理器,其实现过程为:一、首先配置服务管理器的服务接口-实现类,使得编程时,不同模块间程序依赖接口,不直接依赖具体的实现类;二、然后动态注册服务及解析实例:加载服务管理器配置项,判断服务管理器的服务类型是否已注册;如果已注册,或未注册并进行注册完成后,调用Autofac的Resolve方法获取对象实例。2.根据权利要求1所述的一种基于Autofac支持按需加载的服务管理器的实现方法,其特征在于,步骤一中配置内容包括对外提供的服务接口类型、接口实现类的类型及对象实例共享状态定义三部分,同时配置内容还包括可选属性,该可选属性包括配置的名称。3.根据权利要求1所述的一种基于Autofac支持按需加载的服务管理器的实现方法,其特征在于,在步骤二中,服务管理器首次加载时,遍历Autofac的配置文件,将所有配置项加载到内存中,...
【专利技术属性】
技术研发人员:王延东,
申请(专利权)人:济南浪潮高新科技投资发展有限公司,
类型:发明
国别省市:山东,37
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。