Vector records = new Vector();
//服务搜索的事务id集合
int[] transIDs;
StupidBTMIDlet midlet;
public ClientBox(StupidBTMIDlet midlet) {
super("");
this.midlet=midlet;
this.append(result);
this.addCommand(new Command("取消",Command.CANCEL,1));
this.setCommandListener(this);
new Thread(this).start();
}
public void commandAction(Command arg0, Displayable arg1) {
if(arg0.getCommandType()==Command.CANCEL){
midlet.showMainMenu();
}else{
//匿名内部Thread,访问远程服务。
Thread fetchThread=new Thread(){
public void run(){
for(int i=0;i<records.size();i++){
ServiceRecord sr=(ServiceRecord)records.elementAt(i);
if(accessService(sr)){
上一篇:JBuilder2005 Servlet开发之自启动
下一篇:Java环境配置的Classpath使用故障实例
|