@ManagedAttribute(id="inputarguments-current") @Description( "input arguments passed to the Java virtual machine which does not include the arguments to the main method" ) public StringStatistic getInputArguments() { List<String> inputList = rtBean.getInputArguments(); StringBuffer sb = new StringBuffer(); for (String arg : inputList) { sb.append(arg); sb.append(", "); } String finalString = sb.substring(0, sb.lastIndexOf(",")); inputArguments.setCurrent(finalString); return inputArguments; }
appsInfoStat.setCurrent(strBuf.toString()); return appsInfoStat.getStatistic();
@ManagedAttribute(id="stacktrace") @Description( "Returns the stack trace of the thread associated with this ThreadInfo" ) public StringStatistic getStackTrace() { StackTraceElement[] elements = threadInfo.getStackTrace(); StringBuffer sb = new StringBuffer(); for (StackTraceElement ste : elements) { sb.append(ste.toString()); sb.append(','); } stackTrace.setCurrent(sb.toString()); return stackTrace; }
@ManagedAttribute(id="lockownername") @Description( "Returns the name of the thread which owns the object for which the thread associated with this ThreadInfo is blocked waiting" ) public StringStatistic getLockOwnerName() { String name = threadInfo.getLockOwnerName(); if (name == null) { lockOwnerName.setCurrent("None of the other threads is holding any monitors of this thread."); } else { lockOwnerName.setCurrent(name); } return lockOwnerName; }
@ManagedAttribute(id="lockname") @Description( "Returns the string representation of an object for which the thread associated with this ThreadInfo is blocked waiting" ) public StringStatistic getLockName() { String name = threadInfo.getLockName(); if (name == null) { lockName.setCurrent("Thread is not waiting on monitor lock."); } else { lockName.setCurrent(name); } return lockName; }
@ManagedAttribute(id="monitordeadlockedthreads") @Description( "Finds cycles of threads that are in deadlock waiting to acquire object monitors" ) public StringStatistic getMonitorDeadlockedThreads() { long[] threads = threadBean.findMonitorDeadlockedThreads(); if (threads == null) { this.monitorDeadlockedThreads.setCurrent("None of the threads are monitor deadlocked."); } else { StringBuffer sb = new StringBuffer(); for (long thread : threads) { sb.append(thread); sb.append(','); } this.monitorDeadlockedThreads.setCurrent(sb.toString()); } return this.monitorDeadlockedThreads; }
@ManagedAttribute(id="deadlockedthreads") @Description( "Finds cycles of threads that are in deadlock waiting to acquire object monitors or ownable synchronizers" ) public StringStatistic getDeadlockedThreads() { long[] threads = threadBean.findDeadlockedThreads(); if (threads == null) { this.deadlockedThreads.setCurrent("None of the threads are deadlocked."); } else { StringBuffer sb = new StringBuffer(); for (long thread : threads) { sb.append(thread); sb.append(','); } this.deadlockedThreads.setCurrent(sb.toString()); } return deadlockedThreads; }
@ManagedAttribute(id="allthreadids") @Description( "Returns all live thread IDs" ) public StringStatistic getAllThreadIds() { long[] ids = this.threadBean.getAllThreadIds(); StringBuffer sb = new StringBuffer(); boolean first = true; for (long id : ids) { if(first) first = false; else sb.append(','); sb.append(id); } this.allThreadIds.setCurrent(sb.toString()); return allThreadIds; }
@ManagedAttribute(id="threadname") @Description( "Returns the name of the thread associated with this ThreadInfo" ) public StringStatistic getThreadName() { threadName.setCurrent(threadInfo.getThreadName()); return threadName; }
@ManagedAttribute(id="name-current") @Description( "name representing the running Java virtual machine" ) public StringStatistic getRuntimeName() { runtimeName.setCurrent(rtBean.getName()); return runtimeName; }
@ManagedAttribute(id="state") @Description( "Indicates if the transaction service has been frozen." ) public StringStatistic getState() { state.setCurrent((isFrozen)? "True": "False"); return state; }
@ManagedAttribute(id="threadstate") @Description( "Returns the state of the thread associated with this ThreadInfo" ) public StringStatistic getThreadState() { threadState.setCurrent(threadInfo.getThreadState().toString()); return threadState; }
@ManagedAttribute(id="bootclasspath-current") @Description( "boot class path that is used by the bootstrap class loader to search for class files" ) public StringStatistic getBootClassPath() { bootClassPath.setCurrent(rtBean.getBootClassPath()); return bootClassPath; }
@ManagedAttribute(id="librarypath-current") @Description( "Java library path" ) public StringStatistic getLibraryPath() { libraryPath.setCurrent(rtBean.getLibraryPath()); return libraryPath; }
@ManagedAttribute(id="specname-current") @Description( "Java virtual machine specification name" ) public StringStatistic getSpecName() { specName.setCurrent(rtBean.getSpecName()); return specName; }
@ManagedAttribute(id="vmname-current") @Description( "Java virtual machine implementation name" ) public StringStatistic getVmName() { vmName.setCurrent(rtBean.getVmName()); return vmName; }
@ManagedAttribute(id="arch-current") @Description( "operating system architecture" ) public StringStatistic getArch() { arch.setCurrent(osBean.getArch()); return arch; }
@ManagedAttribute(id="classpath-current") @Description( "Java class path that is used by the system class loader to search for class files" ) public StringStatistic getClassPath() { classPath.setCurrent(rtBean.getClassPath()); return classPath; }
@ManagedAttribute(id="name-current") @Description( "operating system name" ) public StringStatistic getOSName() { osName.setCurrent(osBean.getName()); return osName; }
@ManagedAttribute(id="name-current") @Description( "name of the Just-in-time (JIT) compiler" ) public StringStatistic getCompilerName() { compilerName.setCurrent(compBean.getName()); return compilerName; }