public void run() throws IOException {
		//通过输入流接收客户端信息
    	Map<String,String> map = new HashMap<String,String>();
    	int receivelength = 0;
        while (true) {
            String line = in.readLine();
            if (line == null || "".equals(line.trim()) || receivelength>2000) { // 是否终止会话
                break;
            }
            receivelength += line.length();
            
            System.out.println(receivelength+"-<"+line+">");
            //第一行处理验证信息
            if(line.indexOf(":")>-1){
            	int index = line.indexOf(":");
            	String key = line.substring(0,index);
            	String val = line.substring(index+1);
            	map.put(key, val);
            }
        }
        
        //#消息验证
        if(map.containsKey("sign") && map.get("sign").equals(this.sign))
        {
        	if(map.containsKey("action"))
        	{
        		String action = map.get("action");
        		
        		try {
					out.write(new MonitorAction(action).getValue());
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
	        	
	        	out.flush();
        	}
        }
        else
        {
        	out.write("check sign error");
        	out.flush();
        }
        //标识结束
        out.print("\r\n");
        out.flush();
        
        in.close();
        out.close();
        socket.close();
        System.out.println("通信结束，连接已关闭 #" + tid);
    }