public class RemoteThreadsUtil
extends java.lang.Object
public static methods to
help in the management of information given by the RemoteThreadsMBean
class, like type conversion and printing information.| Constructor and Description |
|---|
RemoteThreadsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
printThreadsInfo(java.lang.management.ThreadInfo[] info,
boolean grouped)
Returns an array with the information of a group of threads that can be
printed.
|
static void |
printThreadsInfo(java.lang.management.ThreadInfo[] info,
java.io.PrintStream printer,
boolean grouped)
Prints the information of a group of threads into the specified printer
object
printer. |
static java.lang.management.ThreadInfo[] |
toThreadsInfo(javax.management.openmbean.CompositeData[] data)
Converts a
CompositeData array into a ThreadInfo one
using the ThreadInfo.from(javax.management.openmbean.CompositeData)
method. |
public static java.lang.management.ThreadInfo[] toThreadsInfo(javax.management.openmbean.CompositeData[] data)
CompositeData array into a ThreadInfo one
using the ThreadInfo.from(javax.management.openmbean.CompositeData)
method.data - The CompositeData arrayThreadInfo array corresponding to the
data input data.public static java.lang.String printThreadsInfo(java.lang.management.ThreadInfo[] info,
boolean grouped)
info - The ThreadInfo array with the information to be printedgrouped - If true, the information is grouped by class name and state,
printing the count for each group.public static void printThreadsInfo(java.lang.management.ThreadInfo[] info,
java.io.PrintStream printer,
boolean grouped)
printer. The information can be grouped or not by
thread state and by the name of the class where the thread "started".info - The ThreadInfo array with the information to be printedprinter - Object where the information is going to be printed, such
as System.out.grouped - If true, the information is grouped by class name and state,
printing the count for each group.