public virtual Optional <JmxDump> getJMXDump(long pid) { try { LocalVirtualMachine vm = LocalVirtualMachine.From(pid); @out.println("Attached to running process with process id " + pid); try { JmxDump jmxDump = JmxDump.ConnectTo(vm.JmxAddress); jmxDump.AttachSystemProperties(vm.SystemProperties); @out.println("Connected to JMX endpoint"); return(jmxDump); } catch (IOException e) { PrintError("Unable to communicate with JMX endpoint. Reason: " + e.Message, e); } } catch (java.lang.NoClassDefFoundError e) { PrintError("Unable to attach to process. Reason: JDK is not available, please point " + "environment variable JAVA_HOME to a valid JDK location.", e); } catch (IOException e) { PrintError("Unable to connect to process with process id " + pid + ". Reason: " + e.Message, e); } return(null); }
public DiagnosticsReportSourceAnonymousInnerClass2(JmxDump outerInstance) { this.outerInstance = outerInstance; }