//import java.util.Collection;
import java.util.Iterator;
import java.util.*;
import java.util.Calendar;
import org.red5.server.api.IScope;
import org.red5.server.api.IConnection;
import org.red5.server.adapter.ApplicationAdapter;
import org.red5.server.api.service.IServiceCapableConnection;
public class Mychatroom extends ApplicationAdapter {
String message;
String logInfo="login";
IConnection arg;
public boolean appConnect(IConnection arg0,Object[] arg1){
arg=arg0;
//zmethod2(arg0.getScope());
//System.out.println("ffffffffffffuck");
zmethod(arg,"www"); 
zmethod2(arg0.getScope());
return zmethod1(arg0,arg1[0].toString()); 

}   
public String send(String str){
message=str+Calendar.HOUR+"小时"+Calendar.MINUTE+"分"+Calendar.SECOND+"秒";
zmethod(arg,message); 
//zmethod2(arg.getScope()); 
return "OK"; 

public void zmethod(IConnection coon,String info){
if(coon instanceof IServiceCapableConnection){  
IServiceCapableConnection sc=(IServiceCapableConnection) coon;
sc.invoke("addMessage",new Object[]{info});
}

    public boolean zmethod1(IConnection coon,String str){
     if(str.equals("1314159")) 
     return true; 
        return false; 
    }   
    public void zmethod2(IScope scope){
         Iterator <IConnection> it=scope.getConnections();
                
                }
    
     } 我不明白为什么最后一句会报错 说的是返还值类型不对。 我查文档返还值是对的
而且我也看到网上的代码都是那样写的,为什么我的eclipse会报错............