Shark幫助文檔中原文如下:
javaClassToolAgent - This tool agent executes Java classes, by calling its static method called "execute". When calling this tool agent's invokeapplication() method, the application name parameter should be the full name of the class that should be executed by this tool agent. So far, we defined a few classes that execute simple arithmetic Operation, generation of random number, and one that performs waiting. There are also two classes contributed to by Paloma Trigueros Cabezon, and they can be used to use this tool agent to send mails.
This tool agent is able to "understand" the extended attribute with the following name:
AppName - value of this attribute should rePResent the class name to be executed.
首先要知道這是一種把一個類來作為一個應用的方法,具體做法如下:
1、創建一個新類javaclass.java,類中必須包含一個靜態方法execute,該方法即為希望該類完成的行為。
2、編譯類文件為javaclass.class,并放入:安裝路徑/lib/engine/sharktoolagent-standard.jar中。
3、這樣在編輯process時,就可以應用這些自己編寫的類了??梢远xapplication了,注重定義兩個可擴展屬性:ToolAgentClass=JavaClassToolAgent,AppName=類名(javaclass)。
新聞熱點
疑難解答