PageRenderTime 89ms CodeModel.GetById 64ms app.highlight 18ms RepoModel.GetById 1ms app.codeStats 0ms

/javadoc/com/googlecode/jmxtrans/util/JmxUtils.html

http://jmxtrans.googlecode.com/
HTML | 703 lines | 602 code | 78 blank | 23 comment | 0 complexity | d80b350584c376b27c2eccaa7abde980 MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.6.0_24) on Fri Jul 08 14:42:36 PDT 2011 -->
  6<TITLE>
  7JmxUtils (jmxlogger javadoc)
  8</TITLE>
  9
 10<META NAME="date" CONTENT="2011-07-08">
 11
 12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
 13
 14<SCRIPT type="text/javascript">
 15function windowTitle()
 16{
 17    if (location.href.indexOf('is-external=true') == -1) {
 18        parent.document.title="JmxUtils (jmxlogger javadoc)";
 19    }
 20}
 21</SCRIPT>
 22<NOSCRIPT>
 23</NOSCRIPT>
 24
 25</HEAD>
 26
 27<BODY BGCOLOR="white" onload="windowTitle();">
 28<HR>
 29
 30
 31<!-- ========= START OF TOP NAVBAR ======= -->
 32<A NAME="navbar_top"><!-- --></A>
 33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 35<TR>
 36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 37<A NAME="navbar_top_firstrow"><!-- --></A>
 38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 39  <TR ALIGN="center" VALIGN="top">
 40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 47  </TR>
 48</TABLE>
 49</TD>
 50<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 51</EM>
 52</TD>
 53</TR>
 54
 55<TR>
 56<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 57&nbsp;<A HREF="../../../../com/googlecode/jmxtrans/util/JmxConnectionFactory.html" title="class in com.googlecode.jmxtrans.util"><B>PREV CLASS</B></A>&nbsp;
 58&nbsp;<A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util"><B>NEXT CLASS</B></A></FONT></TD>
 59<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 60  <A HREF="../../../../index.html?com/googlecode/jmxtrans/util/JmxUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 61&nbsp;<A HREF="JmxUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 62&nbsp;<SCRIPT type="text/javascript">
 63  <!--
 64  if(window==top) {
 65    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 66  }
 67  //-->
 68</SCRIPT>
 69<NOSCRIPT>
 70  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
 71</NOSCRIPT>
 72
 73
 74</FONT></TD>
 75</TR>
 76<TR>
 77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 78  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 81</TR>
 82</TABLE>
 83<A NAME="skip-navbar_top"></A>
 84<!-- ========= END OF TOP NAVBAR ========= -->
 85
 86<HR>
 87<!-- ======== START OF CLASS DATA ======== -->
 88<H2>
 89<FONT SIZE="-1">
 90com.googlecode.jmxtrans.util</FONT>
 91<BR>
 92Class JmxUtils</H2>
 93<PRE>
 94java.lang.Object
 95  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.googlecode.jmxtrans.util.JmxUtils</B>
 96</PRE>
 97<HR>
 98<DL>
 99<DT><PRE>public class <B>JmxUtils</B><DT>extends java.lang.Object</DL>
100</PRE>
101
102<P>
103The worker code.
104<P>
105
106<P>
107<DL>
108<DT><B>Author:</B></DT>
109  <DD>jon</DD>
110</DL>
111<HR>
112
113<P>
114<!-- ======== NESTED CLASS SUMMARY ======== -->
115
116<A NAME="nested_class_summary"><!-- --></A>
117<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
118<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
119<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
120<B>Nested Class Summary</B></FONT></TH>
121</TR>
122<TR BGCOLOR="white" CLASS="TableRowColor">
123<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
124<CODE>static&nbsp;class</CODE></FONT></TD>
125<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util">JmxUtils.ProcessQueryThread</A></B></CODE>
126
127<BR>
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes either a getAttribute or getAttributes query.</TD>
129</TR>
130<TR BGCOLOR="white" CLASS="TableRowColor">
131<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132<CODE>static&nbsp;class</CODE></FONT></TD>
133<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessServerThread.html" title="class in com.googlecode.jmxtrans.util">JmxUtils.ProcessServerThread</A></B></CODE>
134
135<BR>
136&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Executes either a getAttribute or getAttributes query.</TD>
137</TR>
138</TABLE>
139&nbsp;
140<!-- ======== CONSTRUCTOR SUMMARY ======== -->
141
142<A NAME="constructor_summary"><!-- --></A>
143<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
144<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
145<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
146<B>Constructor Summary</B></FONT></TH>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#JmxUtils()">JmxUtils</A></B>()</CODE>
150
151<BR>
152&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
153</TR>
154</TABLE>
155&nbsp;
156<!-- ========== METHOD SUMMARY =========== -->
157
158<A NAME="method_summary"><!-- --></A>
159<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
160<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
161<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
162<B>Method Summary</B></FONT></TH>
163</TR>
164<TR BGCOLOR="white" CLASS="TableRowColor">
165<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
167<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#cleanupStr(java.lang.String)">cleanupStr</A></B>(java.lang.String&nbsp;name)</CODE>
168
169<BR>
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces all .</TD>
171</TR>
172<TR BGCOLOR="white" CLASS="TableRowColor">
173<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174<CODE>static&nbsp;void</CODE></FONT></TD>
175<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#execute(com.googlecode.jmxtrans.model.JmxProcess)">execute</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)</CODE>
176
177<BR>
178&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Either invokes the servers multithreaded (max threads == jmxProcess.getMultiThreaded())
179 or invokes them one at a time.</TD>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
183<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
184<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getConcatedTypeNameValues(java.util.List, java.lang.String)">getConcatedTypeNameValues</A></B>(java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
185                          java.lang.String&nbsp;typeNameStr)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given a typeName string, get the first match from the typeNames setting.</TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>static&nbsp;java.util.Map&lt;java.lang.String,org.apache.commons.pool.KeyedObjectPool&gt;</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getDefaultPoolMap()">getDefaultPoolMap</A></B>()</CODE>
194
195<BR>
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper method which returns a default PoolMap.</TD>
197</TR>
198<TR BGCOLOR="white" CLASS="TableRowColor">
199<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
200<CODE>static&nbsp;java.util.Map&lt;java.lang.String,java.lang.String[]&gt;</CODE></FONT></TD>
201<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getEnvironment(com.googlecode.jmxtrans.model.Server)">getEnvironment</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)</CODE>
202
203<BR>
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates the proper username/password environment for JMX connections.</TD>
205</TR>
206<TR BGCOLOR="white" CLASS="TableRowColor">
207<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
208<CODE>static&nbsp;<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A></CODE></FONT></TD>
209<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getJmxProcess(java.io.File)">getJmxProcess</A></B>(java.io.File&nbsp;file)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses jackson to load json configuration from a File into a full object
213 tree representation of that json.</TD>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
218<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getKeyString(com.googlecode.jmxtrans.model.Query, com.googlecode.jmxtrans.model.Result, java.util.Map.Entry, java.util.List, java.lang.String)">getKeyString</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query,
219             <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A>&nbsp;result,
220             java.util.Map.Entry&lt;java.lang.String,java.lang.Object&gt;&nbsp;values,
221             java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
222             java.lang.String&nbsp;rootPrefix)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getKeyString2(com.googlecode.jmxtrans.model.Query, com.googlecode.jmxtrans.model.Result, java.util.Map.Entry, java.util.List, java.lang.String)">getKeyString2</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query,
231              <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A>&nbsp;result,
232              java.util.Map.Entry&lt;java.lang.String,java.lang.Object&gt;&nbsp;values,
233              java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
234              java.lang.String&nbsp;rootPrefix)</CODE>
235
236<BR>
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
238</TR>
239<TR BGCOLOR="white" CLASS="TableRowColor">
240<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241<CODE>static&nbsp;javax.management.remote.JMXConnector</CODE></FONT></TD>
242<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getServerConnection(com.googlecode.jmxtrans.model.Server)">getServerConnection</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)</CODE>
243
244<BR>
245&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper method for connecting to a Server.</TD>
246</TR>
247<TR BGCOLOR="white" CLASS="TableRowColor">
248<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249<CODE>static&nbsp;boolean</CODE></FONT></TD>
250<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#isNumeric(java.lang.Object)">isNumeric</A></B>(java.lang.Object&nbsp;value)</CODE>
251
252<BR>
253&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Useful for figuring out if an Object is a number.</TD>
254</TR>
255<TR BGCOLOR="white" CLASS="TableRowColor">
256<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
257<CODE>static&nbsp;boolean</CODE></FONT></TD>
258<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#isNumeric(java.lang.String)">isNumeric</A></B>(java.lang.String&nbsp;str)</CODE>
259
260<BR>
261&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks if the String contains only unicode digits.</TD>
262</TR>
263<TR BGCOLOR="white" CLASS="TableRowColor">
264<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
265<CODE>static&nbsp;void</CODE></FONT></TD>
266<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#mergeServerLists(java.util.List, java.util.List)">mergeServerLists</A></B>(java.util.List&lt;<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&gt;&nbsp;existing,
267                 java.util.List&lt;<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&gt;&nbsp;adding)</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Merges two lists of servers (and their queries).</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>static&nbsp;void</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#prettyPrintJson(com.googlecode.jmxtrans.model.JmxProcess)">prettyPrintJson</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function good for testing things.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>static&nbsp;void</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#printJson(com.googlecode.jmxtrans.model.JmxProcess)">printJson</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function good for testing things.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>static&nbsp;void</CODE></FONT></TD>
291<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#processQueriesForServer(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Server)">processQueriesForServer</A></B>(javax.management.MBeanServerConnection&nbsp;mbeanServer,
292                        <A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)</CODE>
293
294<BR>
295&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Either invokes the queries multithreaded (max threads == server.getMultiThreaded())
296 or invokes them one at a time.</TD>
297</TR>
298<TR BGCOLOR="white" CLASS="TableRowColor">
299<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
300<CODE>static&nbsp;void</CODE></FONT></TD>
301<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#processQuery(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Query)">processQuery</A></B>(javax.management.MBeanServerConnection&nbsp;mbeanServer,
302             <A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query)</CODE>
303
304<BR>
305&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Responsible for processing individual Queries.</TD>
306</TR>
307<TR BGCOLOR="white" CLASS="TableRowColor">
308<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
309<CODE>static&nbsp;void</CODE></FONT></TD>
310<TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#processServer(com.googlecode.jmxtrans.model.Server, javax.management.remote.JMXConnector)">processServer</A></B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server,
311              javax.management.remote.JMXConnector&nbsp;conn)</CODE>
312
313<BR>
314&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Does the work for processing a Server object.</TD>
315</TR>
316</TABLE>
317&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
318<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
319<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
320<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
321</TR>
322<TR BGCOLOR="white" CLASS="TableRowColor">
323<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
324</TR>
325</TABLE>
326&nbsp;
327<P>
328
329<!-- ========= CONSTRUCTOR DETAIL ======== -->
330
331<A NAME="constructor_detail"><!-- --></A>
332<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
333<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
334<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
335<B>Constructor Detail</B></FONT></TH>
336</TR>
337</TABLE>
338
339<A NAME="JmxUtils()"><!-- --></A><H3>
340JmxUtils</H3>
341<PRE>
342public <B>JmxUtils</B>()</PRE>
343<DL>
344</DL>
345
346<!-- ============ METHOD DETAIL ========== -->
347
348<A NAME="method_detail"><!-- --></A>
349<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
350<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
351<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
352<B>Method Detail</B></FONT></TH>
353</TR>
354</TABLE>
355
356<A NAME="mergeServerLists(java.util.List, java.util.List)"><!-- --></A><H3>
357mergeServerLists</H3>
358<PRE>
359public static void <B>mergeServerLists</B>(java.util.List&lt;<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&gt;&nbsp;existing,
360                                    java.util.List&lt;<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&gt;&nbsp;adding)</PRE>
361<DL>
362<DD>Merges two lists of servers (and their queries). Based on the equality of both sets of objects.
363 Public for testing purposes.
364<P>
365<DD><DL>
366</DL>
367</DD>
368</DL>
369<HR>
370
371<A NAME="processQueriesForServer(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
372processQueriesForServer</H3>
373<PRE>
374public static void <B>processQueriesForServer</B>(javax.management.MBeanServerConnection&nbsp;mbeanServer,
375                                           <A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)
376                                    throws java.lang.Exception</PRE>
377<DL>
378<DD>Either invokes the queries multithreaded (max threads == server.getMultiThreaded())
379 or invokes them one at a time.
380<P>
381<DD><DL>
382
383<DT><B>Throws:</B>
384<DD><CODE>java.lang.Exception</CODE></DL>
385</DD>
386</DL>
387<HR>
388
389<A NAME="processQuery(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Query)"><!-- --></A><H3>
390processQuery</H3>
391<PRE>
392public static void <B>processQuery</B>(javax.management.MBeanServerConnection&nbsp;mbeanServer,
393                                <A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query)
394                         throws java.lang.Exception</PRE>
395<DL>
396<DD>Responsible for processing individual Queries.
397<P>
398<DD><DL>
399
400<DT><B>Throws:</B>
401<DD><CODE>java.lang.Exception</CODE></DL>
402</DD>
403</DL>
404<HR>
405
406<A NAME="getEnvironment(com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
407getEnvironment</H3>
408<PRE>
409public static java.util.Map&lt;java.lang.String,java.lang.String[]&gt; <B>getEnvironment</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)</PRE>
410<DL>
411<DD>Generates the proper username/password environment for JMX connections.
412<P>
413<DD><DL>
414</DL>
415</DD>
416</DL>
417<HR>
418
419<A NAME="execute(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
420execute</H3>
421<PRE>
422public static void <B>execute</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)
423                    throws java.lang.Exception</PRE>
424<DL>
425<DD>Either invokes the servers multithreaded (max threads == jmxProcess.getMultiThreaded())
426 or invokes them one at a time.
427<P>
428<DD><DL>
429
430<DT><B>Throws:</B>
431<DD><CODE>java.lang.Exception</CODE></DL>
432</DD>
433</DL>
434<HR>
435
436<A NAME="getServerConnection(com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
437getServerConnection</H3>
438<PRE>
439public static javax.management.remote.JMXConnector <B>getServerConnection</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server)
440                                                                throws java.lang.Exception</PRE>
441<DL>
442<DD>Helper method for connecting to a Server. You need to close the resulting connection.
443<P>
444<DD><DL>
445
446<DT><B>Throws:</B>
447<DD><CODE>java.lang.Exception</CODE></DL>
448</DD>
449</DL>
450<HR>
451
452<A NAME="processServer(com.googlecode.jmxtrans.model.Server, javax.management.remote.JMXConnector)"><!-- --></A><H3>
453processServer</H3>
454<PRE>
455public static void <B>processServer</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>&nbsp;server,
456                                 javax.management.remote.JMXConnector&nbsp;conn)
457                          throws java.lang.Exception</PRE>
458<DL>
459<DD>Does the work for processing a Server object.
460<P>
461<DD><DL>
462
463<DT><B>Throws:</B>
464<DD><CODE>java.lang.Exception</CODE></DL>
465</DD>
466</DL>
467<HR>
468
469<A NAME="printJson(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
470printJson</H3>
471<PRE>
472public static void <B>printJson</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)
473                      throws java.lang.Exception</PRE>
474<DL>
475<DD>Utility function good for testing things. Prints out the json
476 tree of the JmxProcess.
477<P>
478<DD><DL>
479
480<DT><B>Throws:</B>
481<DD><CODE>java.lang.Exception</CODE></DL>
482</DD>
483</DL>
484<HR>
485
486<A NAME="prettyPrintJson(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
487prettyPrintJson</H3>
488<PRE>
489public static void <B>prettyPrintJson</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A>&nbsp;process)
490                            throws java.lang.Exception</PRE>
491<DL>
492<DD>Utility function good for testing things. Prints out the json
493 tree of the JmxProcess.
494<P>
495<DD><DL>
496
497<DT><B>Throws:</B>
498<DD><CODE>java.lang.Exception</CODE></DL>
499</DD>
500</DL>
501<HR>
502
503<A NAME="getJmxProcess(java.io.File)"><!-- --></A><H3>
504getJmxProcess</H3>
505<PRE>
506public static <A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A> <B>getJmxProcess</B>(java.io.File&nbsp;file)
507                                throws org.codehaus.jackson.JsonParseException,
508                                       org.codehaus.jackson.map.JsonMappingException,
509                                       java.io.IOException</PRE>
510<DL>
511<DD>Uses jackson to load json configuration from a File into a full object
512 tree representation of that json.
513<P>
514<DD><DL>
515
516<DT><B>Throws:</B>
517<DD><CODE>org.codehaus.jackson.JsonParseException</CODE>
518<DD><CODE>org.codehaus.jackson.map.JsonMappingException</CODE>
519<DD><CODE>java.io.IOException</CODE></DL>
520</DD>
521</DL>
522<HR>
523
524<A NAME="isNumeric(java.lang.Object)"><!-- --></A><H3>
525isNumeric</H3>
526<PRE>
527public static boolean <B>isNumeric</B>(java.lang.Object&nbsp;value)</PRE>
528<DL>
529<DD>Useful for figuring out if an Object is a number.
530<P>
531<DD><DL>
532</DL>
533</DD>
534</DL>
535<HR>
536
537<A NAME="isNumeric(java.lang.String)"><!-- --></A><H3>
538isNumeric</H3>
539<PRE>
540public static boolean <B>isNumeric</B>(java.lang.String&nbsp;str)</PRE>
541<DL>
542<DD><p>Checks if the String contains only unicode digits.
543 A decimal point is a digit and returns true.</p>
544
545 <p><code>null</code> will return <code>false</code>.
546 An empty String ("") will return <code>true</code>.</p>
547
548 <pre>
549 StringUtils.isNumeric(null)   = false
550 StringUtils.isNumeric("")     = true
551 StringUtils.isNumeric("  ")   = false
552 StringUtils.isNumeric("123")  = true
553 StringUtils.isNumeric("12 3") = false
554 StringUtils.isNumeric("ab2c") = false
555 StringUtils.isNumeric("12-3") = false
556 StringUtils.isNumeric("12.3") = true
557 </pre>
558<P>
559<DD><DL>
560<DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to check, may be null
561<DT><B>Returns:</B><DD><code>true</code> if only contains digits, and is non-null</DL>
562</DD>
563</DL>
564<HR>
565
566<A NAME="getDefaultPoolMap()"><!-- --></A><H3>
567getDefaultPoolMap</H3>
568<PRE>
569public static java.util.Map&lt;java.lang.String,org.apache.commons.pool.KeyedObjectPool&gt; <B>getDefaultPoolMap</B>()</PRE>
570<DL>
571<DD>Helper method which returns a default PoolMap.
572
573 TODO: allow for more configuration options?
574<P>
575<DD><DL>
576</DL>
577</DD>
578</DL>
579<HR>
580
581<A NAME="getKeyString(com.googlecode.jmxtrans.model.Query, com.googlecode.jmxtrans.model.Result, java.util.Map.Entry, java.util.List, java.lang.String)"><!-- --></A><H3>
582getKeyString</H3>
583<PRE>
584public static java.lang.String <B>getKeyString</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query,
585                                            <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A>&nbsp;result,
586                                            java.util.Map.Entry&lt;java.lang.String,java.lang.Object&gt;&nbsp;values,
587                                            java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
588                                            java.lang.String&nbsp;rootPrefix)</PRE>
589<DL>
590<DD><DL>
591</DL>
592</DD>
593</DL>
594<HR>
595
596<A NAME="getKeyString2(com.googlecode.jmxtrans.model.Query, com.googlecode.jmxtrans.model.Result, java.util.Map.Entry, java.util.List, java.lang.String)"><!-- --></A><H3>
597getKeyString2</H3>
598<PRE>
599public static java.lang.String <B>getKeyString2</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A>&nbsp;query,
600                                             <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A>&nbsp;result,
601                                             java.util.Map.Entry&lt;java.lang.String,java.lang.Object&gt;&nbsp;values,
602                                             java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
603                                             java.lang.String&nbsp;rootPrefix)</PRE>
604<DL>
605<DD><DL>
606</DL>
607</DD>
608</DL>
609<HR>
610
611<A NAME="cleanupStr(java.lang.String)"><!-- --></A><H3>
612cleanupStr</H3>
613<PRE>
614public static java.lang.String <B>cleanupStr</B>(java.lang.String&nbsp;name)</PRE>
615<DL>
616<DD>Replaces all . with _ and removes all spaces and double/single quotes.
617<P>
618<DD><DL>
619</DL>
620</DD>
621</DL>
622<HR>
623
624<A NAME="getConcatedTypeNameValues(java.util.List, java.lang.String)"><!-- --></A><H3>
625getConcatedTypeNameValues</H3>
626<PRE>
627public static java.lang.String <B>getConcatedTypeNameValues</B>(java.util.List&lt;java.lang.String&gt;&nbsp;typeNames,
628                                                         java.lang.String&nbsp;typeNameStr)</PRE>
629<DL>
630<DD>Given a typeName string, get the first match from the typeNames setting.
631 In other words, suppose you have:
632
633 typeName=name=PS Eden Space,type=MemoryPool
634
635 If you addTypeName("name"), then it'll retrieve 'PS Eden Space' from the string
636<P>
637<DD><DL>
638</DL>
639</DD>
640</DL>
641<!-- ========= END OF CLASS DATA ========= -->
642<HR>
643
644
645<!-- ======= START OF BOTTOM NAVBAR ====== -->
646<A NAME="navbar_bottom"><!-- --></A>
647<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
648<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
649<TR>
650<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
651<A NAME="navbar_bottom_firstrow"><!-- --></A>
652<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
653  <TR ALIGN="center" VALIGN="top">
654  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
655  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
656  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
657  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
658  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
659  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
660  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
661  </TR>
662</TABLE>
663</TD>
664<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
665</EM>
666</TD>
667</TR>
668
669<TR>
670<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
671&nbsp;<A HREF="../../../../com/googlecode/jmxtrans/util/JmxConnectionFactory.html" title="class in com.googlecode.jmxtrans.util"><B>PREV CLASS</B></A>&nbsp;
672&nbsp;<A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util"><B>NEXT CLASS</B></A></FONT></TD>
673<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
674  <A HREF="../../../../index.html?com/googlecode/jmxtrans/util/JmxUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
675&nbsp;<A HREF="JmxUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
676&nbsp;<SCRIPT type="text/javascript">
677  <!--
678  if(window==top) {
679    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
680  }
681  //-->
682</SCRIPT>
683<NOSCRIPT>
684  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
685</NOSCRIPT>
686
687
688</FONT></TD>
689</TR>
690<TR>
691<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
692  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
693<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
694DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
695</TR>
696</TABLE>
697<A NAME="skip-navbar_bottom"></A>
698<!-- ======== END OF BOTTOM NAVBAR ======= -->
699
700<HR>
701<i>Copyright &#169; 2011 Jon Stevens and a gang of pencils. All Rights Reserved. Build version: 199</i>
702</BODY>
703</HTML>