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

正文內(nèi)容

jade筆記-資料下載頁(yè)

2025-08-12 14:01本頁(yè)面

【導(dǎo)讀】制等,可以有效地與其它java開發(fā)平臺(tái)和技術(shù)集成。Jade提供了在固定和移動(dòng)環(huán)境中實(shí)施分布式點(diǎn)對(duì)點(diǎn)應(yīng)用的基本服務(wù)。允許agent動(dòng)態(tài)的發(fā)現(xiàn)其他agent以及與其他agent通訊。Agent通過異步消息進(jìn)行通訊,這。種通訊機(jī)制可以在分布和松散耦合的環(huán)境中是通用的。Agents可以在異構(gòu)環(huán)境中通信,通。通過認(rèn)證和為agents分配權(quán)限實(shí)現(xiàn)安全機(jī)制。消息結(jié)構(gòu)使用ACL語(yǔ)言。為了適應(yīng)復(fù)雜對(duì)話,jade提供了一系列執(zhí)行特定人物的交互性為。消息內(nèi)容可以在xml. 靈活性強(qiáng),用java線程實(shí)現(xiàn)多任務(wù)。提供命名服務(wù)和黃頁(yè)服務(wù)。支持圖形化調(diào)試和管理/監(jiān)控工具。并成功執(zhí)行一個(gè)最簡(jiǎn)單的helloworld。假設(shè)現(xiàn)在jdk已經(jīng)安裝并且配置成功。1.下載jade,下載站點(diǎn)為JADE-all-3[1].2.將文件解壓,解壓后,平臺(tái)必須運(yùn)行的bin目錄下的文件我們都放在在d:\jade\下。如果設(shè)置無誤,會(huì)彈出jaderma主容器運(yùn)行界面。譯,我們?yōu)榱私窈箝_發(fā)方便,將jade平臺(tái)與beans平臺(tái)綁定起來。這時(shí)有錯(cuò)誤提示,說明jade。們前面加入的jade庫(kù)添加近來。

  

【正文】 when there are no more containers around (true)。 // 看運(yùn)行參數(shù)中是否有 container if( 0) { if(args[0].equalsIgnoreCase(container)) { // 創(chuàng)建一個(gè)默認(rèn)的 profile Profile p = new ProfileImpl(false)。 //(, false)。 // Create a new nonmain container, connecting to the default // main container (. on this host, port 1099) (Launching the agent container ...+p)。 AgentContainer ac = (p)。 // 創(chuàng)建一個(gè)新的 agent AgentController dummy = (inProcess, , new Object[0])。 // 啟動(dòng)它 (Starting up a DummyAgent...)。 ()。 //等 10 秒 (10000)。 // 殺死這個(gè) agent (Killing DummyAgent...)。 ()。 // 在同一虛擬機(jī)上創(chuàng)建另一個(gè)容器, NB, // NB. 兩個(gè)容器不能共享同一個(gè) Profile 對(duì)象 !!! // 所以需再創(chuàng)建一個(gè) profile 對(duì)象 p = new ProfileImpl(false)。 //(, false)。 AgentContainer another = (p)。 // 用兩個(gè)參數(shù)創(chuàng)建一個(gè)移動(dòng) ag Object[] arguments = new Object[2]。 arguments[0] = Hello World!。 arguments[1]=dummy。 AgentController mobile = (Johnny, , arguments)。 ()。 return。 } } // 在 8888 端口運(yùn)行一個(gè)完整的平臺(tái) t // create a default Profile Profile pMain = new ProfileImpl(null, 8888, null)。 (Launching a whole inprocess platform...+pMain)。 AgentContainer mc = (pMain)。 // 使用默認(rèn)的 profile 啟動(dòng)一個(gè)容器 ProfileImpl pContainer = new ProfileImpl(null, 8888, null)。 (Launching the agent container ...+pContainer)。 AgentContainer cont = (pContainer)。 (Launching the agent container after ...+pContainer)。 (Launching the rma agent on the main container ...)。 AgentController rma = (rma, , new Object[0])。 ()。 // Launch a custom agent, taking an object via the // objecttoagent munication channel. Notice how an Object // is passed to the agent, to achieve a startup synchronization: // this Object is used as a POSIX 39。condvar39。 or a Win32 // 39。EventSemaphore39。 object... CondVar startUpLatch = new CondVar()。 AgentController custom = (customAgent, (), new Object[] { startUpLatch })。 ()。 // Wait until the agent starts up and notifies the Object try { ()。 } catch(InterruptedException ie) { ()。 } // Put an object in the queue, asynchronously (Inserting an object, asynchronously...)。 (Message 1, )。 (Inserted.)。 // Put an object in the queue, synchronously (Inserting an object, synchronously...)。 (mc, )。 (Inserted.)。 } catch(Exception e) { ()。 } } } 現(xiàn)在看看 servlet 能不能調(diào)用這個(gè),在 beans 中建立一個(gè) web工程,添加 jade 庫(kù),建立一個(gè) servlet 在 servlet 中進(jìn)行調(diào)用 Agent,看能不能輸出結(jié)果。 其中主要文件如下 文件名: : package examples。 /* * * * Created on 2020 年 9 月 25 日 , 上午 10:55 */ import .*。 import .*。 import .*。 import .*。 import 。 import 。 import 。 import 。 import .*。 import 。 public class StartServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { (text/html。charset=UTF8)。 PrintWriter out = ()。 (html)。 (head)。 (titleServlet StartServlet/title)。 (/head)。 (body)。 (h1Servlet StartServlet at + () + /h1)。 (font size=10 你好 /font)。 try{ Runtime rt = ()。 (true)。 Profile pMain = new ProfileImpl(null, 8888, null)。 AgentContainer mc = (pMain)。 // set now the default Profile to start a container ProfileImpl pContainer = new ProfileImpl(null, 8888, null)。 (運(yùn)行 Agent 容器 ...+pContainer)。 AgentController rma = (rma, , null)。 ()。 AgentController custom=(custom,null)。 ()。 (我已經(jīng)啟動(dòng)了一個(gè)小 Agent)。 } catch (Exception e){ ()。 } (/body)。 (/html)。 ()。 } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response)。 } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response)。 } public String getServletInfo() { return Short description。 } } : package examples。 import .*。 import .*。 public class CustomAgent extends Agent{ public void setup(){ SimpleBehaviour helloBehaviour=new SimpleBehaviour(this) { boolean finished=false。 public void action() { (Hello World Behaviour run: 你好,世界 !)。 (我是 :)。 (我的本地名稱是 :+getLocalName())。 (我全局唯一的標(biāo)志名稱為 :+getName() )。 finished=true。 try{ (40000)。 } catch( e){ ()。 } (已經(jīng)過了 40 秒鐘 )。 //這里是為了測(cè)試關(guān)掉 IE 之后控制臺(tái)上還會(huì)不會(huì)輸出信息。 } public boolean done() { return finished。 } }。 addBehaviour(helloBehaviour)。 } } : ?xml version= encoding=UTF8? webapp version= xmlns= xmlns:xsi= xsi:schemaLocation= servlet servletnameStartServlet/servletname servletclass/servletclass /servlet servletmapping servletnameStartServlet/servletname
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1