资源简介
aglet编程实例学习和实践,包含各种入门实例
代码片段和文件信息
/*
* @(#)WatcherClient.java
*
* 03L7246 (c) Copyright IBM Corp. 1996 1998
*
* The program is provided “as is“ without any warranty express or
* implied including the warranty of non-infringement and the implied
* warranties of merchantibility and fitness for a particular purpose.
* IBM will not be liable for any damages suffered by you as a result
* of using the Program. In no event will IBM be liable for any
* special indirect or consequential damages or lost profits even if
* IBM has been advised of the possibility of their occurrence. IBM
* will not be liable for any third party claims against you.
*/
import com.ibm.aglet.*;
import com.ibm.aglet.system.Aglets;
import java.net.URL;
import java.util.Properties;
/**
* The WatcherClient example illustrates how to write an application program
* with Aglets. With this API you can create and dispatch an aglet
* send the aglet a message and receive a result from it.
* To run this example you need the server and WatcherSlave Aglet.
*
* @version 1.00 $Date: 1999/10/27 05:16:39 $
* @author Mitsuru Oshima
* @see aglet.system.Aglets
* @see examples.watcher.ProxyWatcher
* @see examples.watcher.WatcherSlave
*/
public class WatcherClient {
public static void main(String a[]) throws java.lang.Exception {
if (a.length < 1) {
System.out.println(“WatcherClient firstAddress secondAddress ...“);
return;
}
System.out.println(“========= Creating in “ + a[0]);
AgletProxy proxy = Aglets.createAglet(a[0]
null
“keio.ics.nak.watcher.WatcherSlave“
null);
System.out.println((String)proxy.sendMessage(new Message(“getInfo“)));
int i = 1;
while(a.length > i) {
try {
System.out.println(“========== Dispatching to “ + a[i]);
proxy = proxy.dispatch( new URL(a[i++]) );
String str = (String)proxy.sendMessage(new Message(“getInfo“));
System.out.println(str);
} catch (Exception ex) {
ex.printStackTrace();
break;
}
}
proxy.dispose();
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
...D..R 0 2006-06-14 16:09 Aglet实例程序
...D..R 0 2006-06-14 16:09 Aglet实例程序\CLIENT
文件 2114 1999-10-27 13:17 Aglet实例程序\CLIENT\WatcherClient.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\EVENTS
文件 2085 1999-10-20 11:04 Aglet实例程序\EVENTS\MobilityEvents.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\HELLO
文件 7789 1999-04-22 15:57 Aglet实例程序\HELLO\HelloAglet.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\HTTP
文件 6448 1999-10-27 13:17 Aglet实例程序\HTTP\WebServerAglet.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\SERVER
文件 1769 1999-10-20 11:04 Aglet实例程序\SERVER\RUNNIT.BAT
文件 2110 1999-10-20 11:04 Aglet实例程序\SERVER\RUNNIT.SH
文件 5717 1999-10-27 13:17 Aglet实例程序\SERVER\ServerApp.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\SIMPLE
文件 952 1999-10-20 11:04 Aglet实例程序\SIMPLE\DisplayAglet.java
文件 1155 1999-10-20 11:04 Aglet实例程序\SIMPLE\TimeoutAglet.java
文件 884 1999-10-20 11:04 Aglet实例程序\SIMPLE\VanillaAglet.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\TALK
文件 2813 1999-10-27 13:17 Aglet实例程序\TALK\TalkMaster.java
文件 2457 1999-10-20 11:04 Aglet实例程序\TALK\TalkSlave.java
文件 2497 1999-10-20 11:04 Aglet实例程序\TALK\TalkWindow.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\WATCHER
文件 5577 1999-10-27 13:17 Aglet实例程序\WATCHER\ProxyWatcher.java
文件 3692 1999-10-27 13:17 Aglet实例程序\WATCHER\WatcherSlave.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\itinerary
文件 7189 1999-10-27 13:17 Aglet实例程序\itinerary\CirculateAglet.java
文件 5257 1999-10-27 13:17 Aglet实例程序\itinerary\MessengerAglet.java
文件 2175 1999-10-20 11:04 Aglet实例程序\itinerary\StationaryAglet.java
文件 5055 1999-10-27 13:17 Aglet实例程序\itinerary\VisitingAglet.java
...D..R 0 2006-06-14 16:09 Aglet实例程序\mdispatcher
............此处省略5个文件信息
- 上一篇:应届毕业生个人简历模板
- 下一篇:半导体物理与工艺答案 施敏
评论
共有 条评论