/** * Initializes an instance of the AnalysisFilter class using the specified trace data. * * @param trace - A TraceData object. This parameter cannot be null. */ public AnalysisFilter(TraceData trace) { // Create default application selections Collection<String> appNames = trace.getAllAppNames(); this.appSelections = new HashMap<String, ApplicationSelection>(appNames.size()); Map<String, Set<InetAddress>> m = trace.getAppIps(); for (String app : appNames) { appSelections.put(app, new ApplicationSelection(app, m.get(app))); } }
public void open(BufferedReader reader) { String line; StringTokenizer token; boolean end_found = false; try { while ((line = reader.readLine()) != null) { token = new StringTokenizer(line); int key = Integer.valueOf(token.nextToken()); if (cmn.debug) System.out.println("GrowBar : " + line); switch (key) { case Glow.eSave_GrowBar: break; case Glow.eSave_GrowBar_max_value: max_value = new Double(token.nextToken()).doubleValue(); break; case Glow.eSave_GrowBar_min_value: min_value = new Double(token.nextToken()).doubleValue(); break; case Glow.eSave_GrowBar_bar_value: bar_value = new Double(token.nextToken()).doubleValue(); break; case Glow.eSave_GrowBar_bar_bordercolor: bar_bordercolor = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_bar_borderwidth: bar_borderwidth = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_bar_drawtype: bar_drawtype = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_rect_part: super.open(reader); break; case Glow.eSave_GrowBar_trace_data1: if (token.hasMoreTokens()) trace.data[0] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data2: if (token.hasMoreTokens()) trace.data[1] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data3: if (token.hasMoreTokens()) trace.data[2] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data4: if (token.hasMoreTokens()) trace.data[3] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data5: if (token.hasMoreTokens()) trace.data[4] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data6: if (token.hasMoreTokens()) trace.data[5] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data7: if (token.hasMoreTokens()) trace.data[6] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data8: if (token.hasMoreTokens()) trace.data[7] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data9: if (token.hasMoreTokens()) trace.data[8] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_data10: if (token.hasMoreTokens()) trace.data[9] = token.nextToken(); break; case Glow.eSave_GrowBar_trace_attr_type: trace.attr_type = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_trace_color: trace.color = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_access: trace.access = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_cycle: trace.cycle = Integer.valueOf(token.nextToken()); break; case Glow.eSave_GrowBar_ref_object: if (token.hasMoreTokens()) trace.ref_object = token.nextToken(); break; case Glow.eSave_GrowBar_userdata_cb: if (cmn.appl != null) userdata = cmn.appl.growUserdataOpen(reader, this, Glow.eUserdataCbType_Node); break; case Glow.eSave_End: end_found = true; break; default: System.out.println("Syntax error in GrowBar"); break; } if (end_found) break; } } catch (Exception e) { System.out.println("IOException GrowBar"); } }