APIdia Launch Partner
Top Description Fields Constructors Methods
sun.jvmstat.monitor

public Class MonitoredVmUtil

extends Object
Class Inheritance

Utility class proving concenience methods for extracting various information from an MonitoredVm object.
Author
Brian Doherty
Since
1.5

Field Summary

Modifier and TypeField and Description
private static int
private static int

Constructor Summary

AccessConstructor and Description
private
MonitoredVmUtil()

Private constructor - prevent instantiation.

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

String - contains the command line of the target Java application or the string "Unknown" if the command line cannot be determined.
commandLine
(MonitoredVm
the target MonitoredVm
vm
)

Return the command line for the target Java application.

public static boolean
isAttachable(MonitoredVm
the target MonitoredVm
vm
)

Returns true if the VM supports attach-on-demand.

public static String

Returns:

String - contains the arguments passed to the JVM for the target Java application or the string "Unknown" if the command line cannot be determined.
jvmArgs
(MonitoredVm
the target MonitoredVm
vm
)

Return the JVM arguments for the target Java application.

public static String

Returns:

String - contains the flags passed to the JVM for the target Java application or the string "Unknown" if the command line cannot be determined.
jvmFlags
(MonitoredVm
the target MonitoredVm
vm
)

Return the JVM flags for the target Java application.

public static String

Returns:

String - contains the arguments to the main class for the target Java application or the string "Unknown" if the command line cannot be determined.
mainArgs
(MonitoredVm
the target MonitoredVm
vm
)

Return the arguments to the main class for the target Java application.

public static String

Returns:

String - contains the main class of the target Java application or the string "Unknown" if the command line cannot be determined.
mainClass
(MonitoredVm
the target MonitoredVm
vm
,
boolean
include the full path to Jar file, where applicable
fullPath
)

Return the main class for the target Java application.

public static String

Returns:

String - contains the version of the target JVM or the the string "Unknown" if the version cannot be determined.
vmVersion
(MonitoredVm
the target MonitoredVm
vm
)

Return the Java Virtual Machine Version.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

IS_ATTACHABLEback to summary
private static int IS_ATTACHABLE
IS_KERNEL_VMback to summary
private static int IS_KERNEL_VM

Constructor Detail

MonitoredVmUtilback to summary
private MonitoredVmUtil()

Private constructor - prevent instantiation.

Method Detail

commandLineback to summary
public static String commandLine(MonitoredVm vm) throws MonitorException

Return the command line for the target Java application.

Parameters
vm:MonitoredVm

the target MonitoredVm

Returns:String

String - contains the command line of the target Java application or the string "Unknown" if the command line cannot be determined.

isAttachableback to summary
public static boolean isAttachable(MonitoredVm vm) throws MonitorException

Returns true if the VM supports attach-on-demand.

Parameters
vm:MonitoredVm

the target MonitoredVm

jvmArgsback to summary
public static String jvmArgs(MonitoredVm vm) throws MonitorException

Return the JVM arguments for the target Java application.

Parameters
vm:MonitoredVm

the target MonitoredVm

Returns:String

String - contains the arguments passed to the JVM for the target Java application or the string "Unknown" if the command line cannot be determined.

jvmFlagsback to summary
public static String jvmFlags(MonitoredVm vm) throws MonitorException

Return the JVM flags for the target Java application.

Parameters
vm:MonitoredVm

the target MonitoredVm

Returns:String

String - contains the flags passed to the JVM for the target Java application or the string "Unknown" if the command line cannot be determined.

mainArgsback to summary
public static String mainArgs(MonitoredVm vm) throws MonitorException

Return the arguments to the main class for the target Java application. Returns the arguments to the main class. If the arguments can't be found, the string "Unknown" is returned.

Parameters
vm:MonitoredVm

the target MonitoredVm

Returns:String

String - contains the arguments to the main class for the target Java application or the string "Unknown" if the command line cannot be determined.

mainClassback to summary
public static String mainClass(MonitoredVm vm, boolean fullPath) throws MonitorException

Return the main class for the target Java application. Returns the main class or the name of the jar file if the application was started with the -jar option.

Parameters
vm:MonitoredVm

the target MonitoredVm

fullPath:boolean

include the full path to Jar file, where applicable

Returns:String

String - contains the main class of the target Java application or the string "Unknown" if the command line cannot be determined.

vmVersionback to summary
public static String vmVersion(MonitoredVm vm) throws MonitorException

Return the Java Virtual Machine Version.

Parameters
vm:MonitoredVm

the target MonitoredVm

Returns:String

String - contains the version of the target JVM or the the string "Unknown" if the version cannot be determined.