freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

某軟件項(xiàng)目開發(fā)手冊(cè)(編輯修改稿)

2024-12-13 23:25 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 服務(wù)接口( Hello Service),對(duì)應(yīng) POJO project 其二是服務(wù)實(shí)現(xiàn),作為一個(gè)單獨(dú)的構(gòu)件位于單獨(dú)的 Bundle 中,并且該構(gòu)件提供 OSGi 服務(wù)( POJOImpl),對(duì)應(yīng) POJOImpl project 其三是服務(wù)使用方,也是作為一個(gè)單獨(dú)的構(gòu)件位于單獨(dú)的 Bundle 中,并且該構(gòu)件需要使 用 Hello Service 接口的 OSGi 服務(wù),對(duì)應(yīng) POJO Client project。 首先,創(chuàng)建一個(gè) helloapi 的服務(wù)接口工程(創(chuàng)建過程見 . ),添加一個(gè)接口類:: ,代碼如下: /* * * InforGuard Copyright 2020 CVICSE, . * All rights reserved. * * Package: * FileName: 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 10 * */ package 。 /** * * 描述: * p * 服務(wù)接口 * /p * 創(chuàng)建日期 202061 * * @author li_ming * @version * */ public interface IHello { /** * 打招呼 * @param name 姓名 * @return 打招呼語(yǔ)句 */ public String sayHello(String name)。 } 使 helloapi 工程支持 Maven,操作如下圖: 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 11 點(diǎn)擊“ Enable Dependency Managerment”,彈出配置界面,填寫如下: 填寫完后,點(diǎn)擊“ Finish”,這時(shí)候 文件會(huì)報(bào)錯(cuò),你需要把下面的代碼加 入 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 12 的 name標(biāo)簽后面: build plugins plugin groupId/groupId artifactIdbuildhelpermavenplugin/artifactId version/version executions execution idaddsource/id phasegeneratesources/phase goals goaladdsource/goal /goals configuration sources sourcesrc/source /sources /configuration /execution /executions /plugin plugin groupId/groupId artifactIdmavenbundleplugin/artifactId version/version extensionstrue/extensions configuration instructions BundleSymbolicName ${} /BundleSymbolicName ExportPackage /ExportPackage /instructions /configuration /plugin /plugins /build 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 13 中各標(biāo)簽的詳細(xì)說明見 附錄五 。 雙擊 ,在 Runtime 中把 包暴露出來,詳見 . 。 接下來只需要在 eclipse 中右擊工程或者 pom 文件,選擇 run as maven install 即完成工程的構(gòu)建工作。當(dāng) maven報(bào)告 [INFO] BUILD SUCCESSFUL則 Hello Service服務(wù)構(gòu)件的 jar包已經(jīng)安裝到 maven的本地庫(kù)中,同時(shí)生成一個(gè)副本位于工程根目錄的 target 下。 第二步創(chuàng)建 Hello 接口的實(shí)現(xiàn)工程: helloimpl,雙擊 ,在 Dependencies 中添加helloapi插件的依賴,詳見 . 。 添加一個(gè) IHello 接口的實(shí)現(xiàn)類: . HelloImpl,代碼如下: /* * * InforGuard Copyright 2020 CVICSE, . * All rights reserved. * * Package: * FileName: * */ package 。 import 。 /** * * 描述: * p * 服務(wù)的實(shí)現(xiàn) * /p * 創(chuàng)建日期 202061 * * @author li_ming * @version * */ public class HelloImpl implements IHello { /** * 構(gòu)造函數(shù) 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 14 */ public HelloImpl() { (HelloImpl starting......)。 } /* (nonJavadoc) * @see sayHello() */ public String sayHello(String name) { String result = hello + name。 return result。 } } 為了能夠管理這些構(gòu)件和讓 DService 框架識(shí)別我們寫的 pojo 并將之發(fā)布為 Hello 的 OSGi 服務(wù),我們還必須要定義一個(gè)元數(shù)據(jù)文件,名稱為 (詳見 附件七 ),位于本 project 的根目錄下。其內(nèi)容如下: ?xml version= encoding=UTF8? DService ponent classname= name=HelloProvider structure=true immediate=false service / /ponent instance ponent=HelloProvider name=HelloPoviderInstance / /DService Component 節(jié)點(diǎn)聲明了一個(gè)構(gòu)件, classname 聲明了該構(gòu)件實(shí)現(xiàn)類, immediate 聲明該構(gòu)件不是即時(shí)構(gòu)件,也就是說當(dāng) OSGi 框架中發(fā)現(xiàn)需要該服務(wù)時(shí)才實(shí)例化該構(gòu)件。 Component 下的 service 節(jié)點(diǎn)表示本構(gòu)件會(huì)以構(gòu)件實(shí)例為服務(wù)對(duì)象對(duì)外提供 OSGi 服務(wù),服務(wù)的接 口默認(rèn)暴露出當(dāng)前構(gòu)件實(shí)現(xiàn)的所有接口,也可以在 service 節(jié)點(diǎn)下加入 provide 節(jié)點(diǎn)來決定該暴露的詳細(xì)的接口,以及對(duì)應(yīng)的服務(wù)屬性等,詳見附件七。 Instance 節(jié)點(diǎn)表示在當(dāng)前構(gòu)件在運(yùn)行時(shí)被 DService 框架初始化完畢之后,根據(jù)配置來確定實(shí)例化構(gòu)件的次數(shù),即有多少個(gè) Instance 就會(huì)有多少個(gè)構(gòu)件實(shí)例(注意不是指服務(wù)對(duì)象)。 源代碼和元數(shù)據(jù)定義完成之后,還需要使 helloimpl 工程支持 Maven,并修改 : build plugins plugin groupId/groupId artifactIdbuildhelpermavenplugin /artifactId 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 15 version/version executions execution idaddsource/id phasegeneratesources/phase goals goaladdsource/goal /goals configuration sources sourcesrc/source /sources /configuration /execution /executions /plugin plugin groupId/groupId artifactIdmavenbundleplugin/artifactId version/version extensionstrue/extensions configuration instructions BundleSymbolicName ${} /BundleSymbolicName PrivatePackage /PrivatePackage IncludeResource /IncludeResource /instructions /configuration /plugin plugin groupId/groupId artifactIdloongdserviceplugin/artifactId version/version executions execution 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 16 goals goaldservicebundle/goal /goals /execution /executions /plugin /plugins /build dependencies dependency groupId/groupId artifactIdhelloapi/artifactId version/version typebundle/type /dependency /dependencies 本 project 所有工作做完之后,同樣只需要在 eclipse 中右擊 project, Run as Maven install, maven會(huì)為我們將 project 打包成為 DService Bundle 安裝到 maven 本地庫(kù)中,并在 target 目錄下生成同樣一份 jar 文件。 最后建立一個(gè)服務(wù)消費(fèi)工程 helloclient,雙擊 ,在 Dependencies 中添加,詳見 . 。 添加一個(gè)服務(wù)使用類: ,代碼如下: /* * * InforGuard Copyright 2020 CVICSE, . * All rights reserved. * * Package: * FileName: * */ package 。 import 。 /** * * 描述: p 服務(wù)消費(fèi)類 /p 錯(cuò)誤 !未找到引用源。 錯(cuò)誤 !未指定書簽。 錯(cuò)誤 !未指定書簽。 17 * 創(chuàng)建日期 202061 * @author li_ming * @version * */ public class HelloClient implements Runnable { /** * 兩個(gè)調(diào)用之間的延遲。 */ private static final int DELAY = 5000。 /** * Hello 服務(wù)。 * 通過容器注入。 * */ private IHello[] m_hello。 // 需要引用的服務(wù)。 /** * 結(jié)束標(biāo)志。 **/
點(diǎn)擊復(fù)制文檔內(nèi)容
研究報(bào)告相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1