|  |  |  | 
|---|
|  |  |  | import com.dy.testServer.ServerProperties; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class Manager { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean enablemwTestStart = false ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean enablemwTestStartTcpConnect = false ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static boolean enablemwTestStartRtuReport = false ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static int clientId = 1 ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static long maxClient = 0 ; | 
|---|
|  |  |  | 
|---|
|  |  |  | }else if(rqVo.code.equals(Code.cd3)){ | 
|---|
|  |  |  | resVo.obj = doDealGetStart(rqVo) ; | 
|---|
|  |  |  | }else if(rqVo.code.equals(Code.cd4)){ | 
|---|
|  |  |  | doDealReportCount(rqVo) ; | 
|---|
|  |  |  | resVo.obj = doDealGetReport(rqVo) ; | 
|---|
|  |  |  | }else if(rqVo.code.equals(Code.cd5)){ | 
|---|
|  |  |  | doDealReportOver(rqVo) ; | 
|---|
|  |  |  | doDealReportCount(rqVo) ; | 
|---|
|  |  |  | }else if(rqVo.code.equals(Code.cd6)){ | 
|---|
|  |  |  | doDealReportOver(rqVo) ; | 
|---|
|  |  |  | }else if(rqVo.code.equals(Code.cd7)){ | 
|---|
|  |  |  | doDealAllOver(rqVo) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return resVo ; | 
|---|
|  |  |  | 
|---|
|  |  |  | conVo.sendInterval = ServerProperties.sendInterval ; | 
|---|
|  |  |  | conVo.heartbeatTimes = ServerProperties.heartbeatTimes ; | 
|---|
|  |  |  | conVo.sendTimes = ServerProperties.sendTimes ; | 
|---|
|  |  |  | conVo.sendOverThenCloseConnect = ServerProperties.sendOverThenCloseConnect ; | 
|---|
|  |  |  | sta = new MwTestClientStatus() ; | 
|---|
|  |  |  | sta.confVo = conVo ; | 
|---|
|  |  |  | token2ClientMap.put("" + token, sta); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return conVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | private static ResStartVo doDealGetStart(RmiRequestVo rqVo){ | 
|---|
|  |  |  | ResStartVo rvo = new ResStartVo() ; | 
|---|
|  |  |  | rvo.start = enablemwTestStart ; | 
|---|
|  |  |  | private static ResStartTcpConnectVo doDealGetStart(RmiRequestVo rqVo){ | 
|---|
|  |  |  | ResStartTcpConnectVo rvo = new ResStartTcpConnectVo() ; | 
|---|
|  |  |  | rvo.start = enablemwTestStartTcpConnect ; | 
|---|
|  |  |  | int token = Integer.parseInt(rqVo.token) ; | 
|---|
|  |  |  | MwTestClientStatus sta = token2ClientMap.get("" + token); | 
|---|
|  |  |  | if(sta == null){ | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return rvo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static ResStartRtuReportVo doDealGetReport(RmiRequestVo rqVo){ | 
|---|
|  |  |  | ResStartRtuReportVo rvo = new ResStartRtuReportVo() ; | 
|---|
|  |  |  | rvo.report = enablemwTestStartRtuReport ; | 
|---|
|  |  |  | int token = Integer.parseInt(rqVo.token) ; | 
|---|
|  |  |  | MwTestClientStatus sta = token2ClientMap.get("" + token); | 
|---|
|  |  |  | if(sta == null){ | 
|---|
|  |  |  | sta = new MwTestClientStatus() ; | 
|---|
|  |  |  | sta.reportVo = rvo ; | 
|---|
|  |  |  | token2ClientMap.put("" + token, sta); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | sta.reportVo = rvo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return rvo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private static void doDealReportCount(RmiRequestVo rqVo){ | 
|---|
|  |  |  | int token = Integer.parseInt(rqVo.token) ; | 
|---|