jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.Session.addTrace ( Hashtable< String, String >  rqst)

Add a trace to the tab enumerator.

Parameters
[in]rqstthe parsed peer request

Definition at line 140 of file Session.java.

References org.libcsdbg.jtracer.Registry.loadIcon(), and org.libcsdbg.jtracer.Session.tabs.

Referenced by org.libcsdbg.jtracer.Session.run().

141  {
142  Registry conf = Registry.getCurrent();
143  TracePane pane = new TracePane(rqst);
144  traces.add(pane);
145 
146  /*String token = rqst.get("tstamp");
147  details.setTimestamp(Long.parseLong(token, 16));
148 
149  token = rqst.get("exception");
150  if (token != null)
151  details.setMessage(token);
152  else
153  details.setMessage("Thread stack trace"); */
154 
155  String host = link.getInetAddress().getCanonicalHostName();
156  String addr = link.getInetAddress().getHostAddress();
157  int port = link.getPort();
158  //details.setAddress(host, port);
159 
160  pane.append(rqst.get("trace"));
161  JPanel view = new JPanel(new BorderLayout());
162  view.add(pane);
163  pane.setMargin(new Insets(6, 2, 0, 2));
164 
165  JScrollPane scroll = new JScrollPane(view);
166  scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
167  tabs.addTab("Thread " + rqst.get("tid"), conf.loadIcon("new.png"), scroll);
168 
169  String path = rqst.get("path");
170  int pid = Integer.parseInt(rqst.get("pid"), 16);
171  setTitle(path + " (" + pid + "@" + addr + ")");
172 
173  int len = rqst.get("request").length();
174  StringBuffer msg = new StringBuffer();
175  msg.append("Read " + len + " bytes ");
176  msg.append("for " + path + " (" + pid + "@");
177  msg.append(addr + ":" + port + ")");
178  firePropertyChange("sessionRequest", null, msg.toString());
179  firePropertyChange("traceCount", null, tabs.getTabCount());
180 
181  tools.getComponent(0).setEnabled(true);
182  tools.getComponent(7).setEnabled(true);
183  }
JTabbedPane tabs
Trace enumeration pane.
Definition: Session.java:56

+ Here is the call graph for this function:

+ Here is the caller graph for this function: