/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
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.6.0_24) on Fri Jul 08 14:42:36 PDT 2011 -->
- <TITLE>
- JmxUtils (jmxlogger javadoc)
- </TITLE>
- <META NAME="date" CONTENT="2011-07-08">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="JmxUtils (jmxlogger javadoc)";
- }
- }
- </SCRIPT>
- <NOSCRIPT>
- </NOSCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" onload="windowTitle();">
- <HR>
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../com/googlecode/jmxtrans/util/JmxConnectionFactory.html" title="class in com.googlecode.jmxtrans.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?com/googlecode/jmxtrans/util/JmxUtils.html" target="_top"><B>FRAMES</B></A>
- <A HREF="JmxUtils.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- com.googlecode.jmxtrans.util</FONT>
- <BR>
- Class JmxUtils</H2>
- <PRE>
- java.lang.Object
- <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.googlecode.jmxtrans.util.JmxUtils</B>
- </PRE>
- <HR>
- <DL>
- <DT><PRE>public class <B>JmxUtils</B><DT>extends java.lang.Object</DL>
- </PRE>
- <P>
- The worker code.
- <P>
- <P>
- <DL>
- <DT><B>Author:</B></DT>
- <DD>jon</DD>
- </DL>
- <HR>
- <P>
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <A NAME="nested_class_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Nested Class Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util">JmxUtils.ProcessQueryThread</A></B></CODE>
- <BR>
- Executes either a getAttribute or getAttributes query.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static class</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessServerThread.html" title="class in com.googlecode.jmxtrans.util">JmxUtils.ProcessServerThread</A></B></CODE>
- <BR>
- Executes either a getAttribute or getAttributes query.</TD>
- </TR>
- </TABLE>
-
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <A NAME="constructor_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Constructor Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#JmxUtils()">JmxUtils</A></B>()</CODE>
- <BR>
- </TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#cleanupStr(java.lang.String)">cleanupStr</A></B>(java.lang.String name)</CODE>
- <BR>
- Replaces all .</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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> process)</CODE>
- <BR>
- Either invokes the servers multithreaded (max threads == jmxProcess.getMultiThreaded())
- or invokes them one at a time.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getConcatedTypeNameValues(java.util.List, java.lang.String)">getConcatedTypeNameValues</A></B>(java.util.List<java.lang.String> typeNames,
- java.lang.String typeNameStr)</CODE>
- <BR>
- Given a typeName string, get the first match from the typeNames setting.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getDefaultPoolMap()">getDefaultPoolMap</A></B>()</CODE>
- <BR>
- Helper method which returns a default PoolMap.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.util.Map<java.lang.String,java.lang.String[]></CODE></FONT></TD>
- <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> server)</CODE>
- <BR>
- Generates the proper username/password environment for JMX connections.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static <A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#getJmxProcess(java.io.File)">getJmxProcess</A></B>(java.io.File file)</CODE>
- <BR>
- Uses jackson to load json configuration from a File into a full object
- tree representation of that json.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <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> query,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A> result,
- java.util.Map.Entry<java.lang.String,java.lang.Object> values,
- java.util.List<java.lang.String> typeNames,
- java.lang.String rootPrefix)</CODE>
- <BR>
- </TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static java.lang.String</CODE></FONT></TD>
- <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> query,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A> result,
- java.util.Map.Entry<java.lang.String,java.lang.Object> values,
- java.util.List<java.lang.String> typeNames,
- java.lang.String rootPrefix)</CODE>
- <BR>
- </TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static javax.management.remote.JMXConnector</CODE></FONT></TD>
- <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> server)</CODE>
- <BR>
- Helper method for connecting to a Server.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#isNumeric(java.lang.Object)">isNumeric</A></B>(java.lang.Object value)</CODE>
- <BR>
- Useful for figuring out if an Object is a number.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#isNumeric(java.lang.String)">isNumeric</A></B>(java.lang.String str)</CODE>
- <BR>
- Checks if the String contains only unicode digits.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.html#mergeServerLists(java.util.List, java.util.List)">mergeServerLists</A></B>(java.util.List<<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>> existing,
- java.util.List<<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>> adding)</CODE>
- <BR>
- Merges two lists of servers (and their queries).</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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> process)</CODE>
- <BR>
- Utility function good for testing things.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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> process)</CODE>
- <BR>
- Utility function good for testing things.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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 mbeanServer,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A> server)</CODE>
- <BR>
- Either invokes the queries multithreaded (max threads == server.getMultiThreaded())
- or invokes them one at a time.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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 mbeanServer,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A> query)</CODE>
- <BR>
- Responsible for processing individual Queries.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE>static void</CODE></FONT></TD>
- <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> server,
- javax.management.remote.JMXConnector conn)</CODE>
- <BR>
- Does the work for processing a Server object.</TD>
- </TR>
- </TABLE>
- <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
- <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
- </TR>
- </TABLE>
-
- <P>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <A NAME="constructor_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Constructor Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="JmxUtils()"><!-- --></A><H3>
- JmxUtils</H3>
- <PRE>
- public <B>JmxUtils</B>()</PRE>
- <DL>
- </DL>
- <!-- ============ METHOD DETAIL ========== -->
- <A NAME="method_detail"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
- <B>Method Detail</B></FONT></TH>
- </TR>
- </TABLE>
- <A NAME="mergeServerLists(java.util.List, java.util.List)"><!-- --></A><H3>
- mergeServerLists</H3>
- <PRE>
- public static void <B>mergeServerLists</B>(java.util.List<<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>> existing,
- java.util.List<<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A>> adding)</PRE>
- <DL>
- <DD>Merges two lists of servers (and their queries). Based on the equality of both sets of objects.
- Public for testing purposes.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="processQueriesForServer(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
- processQueriesForServer</H3>
- <PRE>
- public static void <B>processQueriesForServer</B>(javax.management.MBeanServerConnection mbeanServer,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A> server)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Either invokes the queries multithreaded (max threads == server.getMultiThreaded())
- or invokes them one at a time.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="processQuery(javax.management.MBeanServerConnection, com.googlecode.jmxtrans.model.Query)"><!-- --></A><H3>
- processQuery</H3>
- <PRE>
- public static void <B>processQuery</B>(javax.management.MBeanServerConnection mbeanServer,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A> query)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Responsible for processing individual Queries.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getEnvironment(com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
- getEnvironment</H3>
- <PRE>
- public static java.util.Map<java.lang.String,java.lang.String[]> <B>getEnvironment</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A> server)</PRE>
- <DL>
- <DD>Generates the proper username/password environment for JMX connections.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="execute(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
- execute</H3>
- <PRE>
- public static void <B>execute</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A> process)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Either invokes the servers multithreaded (max threads == jmxProcess.getMultiThreaded())
- or invokes them one at a time.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getServerConnection(com.googlecode.jmxtrans.model.Server)"><!-- --></A><H3>
- getServerConnection</H3>
- <PRE>
- public 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> server)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Helper method for connecting to a Server. You need to close the resulting connection.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="processServer(com.googlecode.jmxtrans.model.Server, javax.management.remote.JMXConnector)"><!-- --></A><H3>
- processServer</H3>
- <PRE>
- public static void <B>processServer</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Server.html" title="class in com.googlecode.jmxtrans.model">Server</A> server,
- javax.management.remote.JMXConnector conn)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Does the work for processing a Server object.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="printJson(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
- printJson</H3>
- <PRE>
- public static void <B>printJson</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A> process)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Utility function good for testing things. Prints out the json
- tree of the JmxProcess.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="prettyPrintJson(com.googlecode.jmxtrans.model.JmxProcess)"><!-- --></A><H3>
- prettyPrintJson</H3>
- <PRE>
- public static void <B>prettyPrintJson</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A> process)
- throws java.lang.Exception</PRE>
- <DL>
- <DD>Utility function good for testing things. Prints out the json
- tree of the JmxProcess.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>java.lang.Exception</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getJmxProcess(java.io.File)"><!-- --></A><H3>
- getJmxProcess</H3>
- <PRE>
- public static <A HREF="../../../../com/googlecode/jmxtrans/model/JmxProcess.html" title="class in com.googlecode.jmxtrans.model">JmxProcess</A> <B>getJmxProcess</B>(java.io.File file)
- throws org.codehaus.jackson.JsonParseException,
- org.codehaus.jackson.map.JsonMappingException,
- java.io.IOException</PRE>
- <DL>
- <DD>Uses jackson to load json configuration from a File into a full object
- tree representation of that json.
- <P>
- <DD><DL>
- <DT><B>Throws:</B>
- <DD><CODE>org.codehaus.jackson.JsonParseException</CODE>
- <DD><CODE>org.codehaus.jackson.map.JsonMappingException</CODE>
- <DD><CODE>java.io.IOException</CODE></DL>
- </DD>
- </DL>
- <HR>
- <A NAME="isNumeric(java.lang.Object)"><!-- --></A><H3>
- isNumeric</H3>
- <PRE>
- public static boolean <B>isNumeric</B>(java.lang.Object value)</PRE>
- <DL>
- <DD>Useful for figuring out if an Object is a number.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="isNumeric(java.lang.String)"><!-- --></A><H3>
- isNumeric</H3>
- <PRE>
- public static boolean <B>isNumeric</B>(java.lang.String str)</PRE>
- <DL>
- <DD><p>Checks if the String contains only unicode digits.
- A decimal point is a digit and returns true.</p>
- <p><code>null</code> will return <code>false</code>.
- An empty String ("") will return <code>true</code>.</p>
- <pre>
- StringUtils.isNumeric(null) = false
- StringUtils.isNumeric("") = true
- StringUtils.isNumeric(" ") = false
- StringUtils.isNumeric("123") = true
- StringUtils.isNumeric("12 3") = false
- StringUtils.isNumeric("ab2c") = false
- StringUtils.isNumeric("12-3") = false
- StringUtils.isNumeric("12.3") = true
- </pre>
- <P>
- <DD><DL>
- <DT><B>Parameters:</B><DD><CODE>str</CODE> - the String to check, may be null
- <DT><B>Returns:</B><DD><code>true</code> if only contains digits, and is non-null</DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getDefaultPoolMap()"><!-- --></A><H3>
- getDefaultPoolMap</H3>
- <PRE>
- public static java.util.Map<java.lang.String,org.apache.commons.pool.KeyedObjectPool> <B>getDefaultPoolMap</B>()</PRE>
- <DL>
- <DD>Helper method which returns a default PoolMap.
- TODO: allow for more configuration options?
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <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>
- getKeyString</H3>
- <PRE>
- public static java.lang.String <B>getKeyString</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A> query,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A> result,
- java.util.Map.Entry<java.lang.String,java.lang.Object> values,
- java.util.List<java.lang.String> typeNames,
- java.lang.String rootPrefix)</PRE>
- <DL>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <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>
- getKeyString2</H3>
- <PRE>
- public static java.lang.String <B>getKeyString2</B>(<A HREF="../../../../com/googlecode/jmxtrans/model/Query.html" title="class in com.googlecode.jmxtrans.model">Query</A> query,
- <A HREF="../../../../com/googlecode/jmxtrans/model/Result.html" title="class in com.googlecode.jmxtrans.model">Result</A> result,
- java.util.Map.Entry<java.lang.String,java.lang.Object> values,
- java.util.List<java.lang.String> typeNames,
- java.lang.String rootPrefix)</PRE>
- <DL>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="cleanupStr(java.lang.String)"><!-- --></A><H3>
- cleanupStr</H3>
- <PRE>
- public static java.lang.String <B>cleanupStr</B>(java.lang.String name)</PRE>
- <DL>
- <DD>Replaces all . with _ and removes all spaces and double/single quotes.
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <HR>
- <A NAME="getConcatedTypeNameValues(java.util.List, java.lang.String)"><!-- --></A><H3>
- getConcatedTypeNameValues</H3>
- <PRE>
- public static java.lang.String <B>getConcatedTypeNameValues</B>(java.util.List<java.lang.String> typeNames,
- java.lang.String typeNameStr)</PRE>
- <DL>
- <DD>Given a typeName string, get the first match from the typeNames setting.
- In other words, suppose you have:
- typeName=name=PS Eden Space,type=MemoryPool
- If you addTypeName("name"), then it'll retrieve 'PS Eden Space' from the string
- <P>
- <DD><DL>
- </DL>
- </DD>
- </DL>
- <!-- ========= END OF CLASS DATA ========= -->
- <HR>
- <!-- ======= START OF BOTTOM NAVBAR ====== -->
- <A NAME="navbar_bottom"><!-- --></A>
- <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_bottom_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../com/googlecode/jmxtrans/util/JmxConnectionFactory.html" title="class in com.googlecode.jmxtrans.util"><B>PREV CLASS</B></A>
- <A HREF="../../../../com/googlecode/jmxtrans/util/JmxUtils.ProcessQueryThread.html" title="class in com.googlecode.jmxtrans.util"><B>NEXT CLASS</B></A></FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../../index.html?com/googlecode/jmxtrans/util/JmxUtils.html" target="_top"><B>FRAMES</B></A>
- <A HREF="JmxUtils.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_bottom"></A>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <HR>
- <i>Copyright © 2011 Jon Stevens and a gang of pencils. All Rights Reserved. Build version: 199</i>
- </BODY>
- </HTML>