예제 #1
0
 public MapPack fetch() {
   TcpProxy tcp = TcpProxy.getTcpProxy(serverId);
   Pack pack = null;
   try {
     MapPack param = new MapPack();
     ListValue objLv = param.newList("objHash");
     Map<Integer, AgentObject> agentMap = AgentModelThread.getInstance().getAgentObjectMap();
     for (AgentObject p : agentMap.values()) {
       if (p.getObjType().equals(objType)) {
         objLv.add(p.getObjHash());
       }
     }
     pack = tcp.getSingle(RequestCmd.REALTIME_SERVICE_GROUP, param);
   } catch (Throwable th) {
     th.printStackTrace();
   } finally {
     TcpProxy.putTcpProxy(tcp);
   }
   MapPack m = null;
   if (pack != null) {
     m = (MapPack) pack;
     long time = TimeUtil.getCurrentTime(serverId);
     m.put("time", time);
     fiveMinMap.put(time, m);
   }
   return m;
 }
예제 #2
0
 public Image getImage(Object element) {
   if (element instanceof StartHome) {
     return Images.CONFIG_USER;
   } else if (element instanceof XLogData) {
     XLogData d = (XLogData) element;
     AgentObject ao =
         agentProxy.getAgentObject(DateUtil.yyyymmdd(d.p.endTime), d.serverId, d.p.objHash);
     if (ao != null) {
       return Images.getObjectIcon(ao.getObjType(), true, ao.getServerId());
     }
   }
   return null;
 }