| | |
| | | @Override |
| | | public void run() { |
| | | if (isOpen()) { |
| | | send(("key:"+ eStockType.getStockKey()+":"+eStockType.getContryId()).getBytes()); |
| | | //send(("key:"+ eStockType.getStockKey()+":"+eStockType.getContryId()).getBytes()); |
| | | send("heartbeat"); |
| | | } |
| | | } |
| | | }, 0, 3000); // 每3秒发送一次心跳消息 |
| | |
| | | System.out.println("mex" + message); |
| | | return; |
| | | } |
| | | System.out.println("mex2" + message); |
| | | //System.out.println("mex2" + message); |
| | | Map<String, String> stringObjectMap = jsonToMap(message); |
| | | StockRealTimeBean stockRealTimeBean = new StockRealTimeBean(); |
| | | stockRealTimeBean.setPid(stringObjectMap.get("Id").toString()); |