Class ExtendedRuntimeMXBeanImpl

java.lang.Object
com.ibm.lang.management.internal.ExtendedRuntimeMXBeanImpl
All Implemented Interfaces:
RuntimeMXBean, PlatformManagedObject, RuntimeMXBean

public final class ExtendedRuntimeMXBeanImpl extends Object implements RuntimeMXBean
Runtime type for RuntimeMXBean.
Since:
1.5
  • Method Details

    • getInstance

      public static RuntimeMXBean getInstance()
      Singleton accessor method.
      Returns:
      the RuntimeMXBeanImpl singleton.
    • getCPULoad

      public double getCPULoad()
      Returns a double value which holds the system load average calculated for the minute preceding the call, where system load average is taken to mean the following:

      The time-averaged value of the sum of the number of runnable entities running on the available processors and the number of runnable entities ready and queued to run on the available processors. The averaging technique adopted can vary depending on the underlying operating system.

      Specified by:
      getCPULoad in interface RuntimeMXBean
      Returns:
      normally, the system load average as a double. If the system load average is not obtainable (e.g. because the calculation may involve an unacceptable performance impact) then a negative value is returned.
      See Also:
    • getVMGeneratedCPULoad

      public double getVMGeneratedCPULoad()
      Returns a system load average calculated over the minute preceding the call averaged over the number of CPU available to Java virtual machine process.
      Specified by:
      getVMGeneratedCPULoad in interface RuntimeMXBean
      Returns:
      A double indicating the average system load per processor. If the system load average is not available, it returns a negative value to indicate this.
    • getVMIdleState

      public RuntimeMXBean.VMIdleStates getVMIdleState()
      Returns current JVM Idle state.
      Specified by:
      getVMIdleState in interface RuntimeMXBean
      Returns:
      JVM idle state value - i.e active / idle
    • isVMIdle

      public boolean isVMIdle()
      Specified by:
      isVMIdle in interface RuntimeMXBean
      Returns:
      true if JVM state is idle. Otherwise returns false
    • isAttachApiInitialized

      public boolean isAttachApiInitialized()
      Description copied from interface: RuntimeMXBean
      Query the state of the Attach API. Return false if the Attach API is: - still initializing - disabled - terminated by VM shutdown
      Specified by:
      isAttachApiInitialized in interface RuntimeMXBean
      Returns:
      true if Attach API is initialized
    • isAttachApiTerminated

      public boolean isAttachApiTerminated()
      Description copied from interface: RuntimeMXBean
      Query the state of the Attach API. Return true if the Attach API is: - disabled - terminated by VM shutdown and false if it is - still initializing - initialized and running
      Specified by:
      isAttachApiTerminated in interface RuntimeMXBean
      Returns:
      true if Attach API is terminated
    • getVmId

      public String getVmId()
      Description copied from interface: RuntimeMXBean
      This is provided for the benefit of applications which use attach API to load JVMTI agents into their own JVMs.
      Specified by:
      getVmId in interface RuntimeMXBean
      Returns:
      Attach API Virtual Machine ID of this VM
    • getBootClassPath

      public final String getBootClassPath()
      Returns the boot class path that is used by the bootstrap class loader to search for class files.

      Multiple paths in the boot class path are separated by the path separator character of the platform on which the Java virtual machine is running.

      A Java virtual machine implementation may not support the boot class path mechanism for the bootstrap class loader to search for class files. The RuntimeMXBean.isBootClassPathSupported() method can be used to determine if the Java virtual machine supports this method.

      Specified by:
      getBootClassPath in interface RuntimeMXBean
      Returns:
      the boot class path.
    • getClassPath

      public final String getClassPath()
      Returns the Java class path that is used by the system class loader to search for class files. This method is equivalent to System.getProperty("java.class.path").

      Multiple paths in the Java class path are separated by the path separator character of the platform of the Java virtual machine being monitored.

      Specified by:
      getClassPath in interface RuntimeMXBean
      Returns:
      the Java class path.
      See Also:
    • getLibraryPath

      public final String getLibraryPath()
      Returns the Java library path. This method is equivalent to System.getProperty("java.library.path").

      Multiple paths in the Java library path are separated by the path separator character of the platform of the Java virtual machine being monitored.

      Specified by:
      getLibraryPath in interface RuntimeMXBean
      Returns:
      the Java library path.
      See Also:
    • getManagementSpecVersion

      public final String getManagementSpecVersion()
      Returns the version of the specification for the management interface implemented by the running Java virtual machine.
      Specified by:
      getManagementSpecVersion in interface RuntimeMXBean
      Returns:
      the version of the specification for the management interface implemented by the running Java virtual machine.
    • getName

      public final String getName()
      Returns the name representing the running Java virtual machine. The returned name string can be any arbitrary string and a Java virtual machine implementation can choose to embed platform-specific useful information in the returned name string. Each running virtual machine could have a different name.
      Specified by:
      getName in interface RuntimeMXBean
      Returns:
      the name representing the running Java virtual machine.
    • getSpecName

      public final String getSpecName()
      Returns the Java virtual machine specification name. This method is equivalent to System.getProperty("java.vm.specification.name").
      Specified by:
      getSpecName in interface RuntimeMXBean
      Returns:
      the Java virtual machine specification name.
      See Also:
    • getSpecVendor

      public final String getSpecVendor()
      Returns the Java virtual machine specification vendor. This method is equivalent to System.getProperty("java.vm.specification.vendor").
      Specified by:
      getSpecVendor in interface RuntimeMXBean
      Returns:
      the Java virtual machine specification vendor.
      See Also:
    • getSpecVersion

      public final String getSpecVersion()
      Returns the Java virtual machine specification version. This method is equivalent to System.getProperty("java.vm.specification.version").
      Specified by:
      getSpecVersion in interface RuntimeMXBean
      Returns:
      the Java virtual machine specification version.
      See Also:
    • getStartTime

      public final long getStartTime()
      Returns the start time of the Java virtual machine in milliseconds. This method returns the approximate time when the Java virtual machine started.
      Specified by:
      getStartTime in interface RuntimeMXBean
      Returns:
      start time of the Java virtual machine in milliseconds.
    • getUptime

      public final long getUptime()
      Returns the uptime of the Java virtual machine in milliseconds.
      Specified by:
      getUptime in interface RuntimeMXBean
      Returns:
      uptime of the Java virtual machine in milliseconds.
    • getVmName

      public final String getVmName()
      Returns the Java virtual machine implementation name. This method is equivalent to System.getProperty("java.vm.name").
      Specified by:
      getVmName in interface RuntimeMXBean
      Returns:
      the Java virtual machine implementation name.
      See Also:
    • getVmVendor

      public final String getVmVendor()
      Returns the Java virtual machine implementation vendor. This method is equivalent to System.getProperty("java.vm.vendor").
      Specified by:
      getVmVendor in interface RuntimeMXBean
      Returns:
      the Java virtual machine implementation vendor.
      See Also:
    • getVmVersion

      public final String getVmVersion()
      Returns the Java virtual machine implementation version. This method is equivalent to System.getProperty("java.vm.version").
      Specified by:
      getVmVersion in interface RuntimeMXBean
      Returns:
      the Java virtual machine implementation version.
      See Also:
    • isBootClassPathSupported

      public final boolean isBootClassPathSupported()
      Tests if the Java virtual machine supports the boot class path mechanism used by the bootstrap class loader to search for class files.
      Specified by:
      isBootClassPathSupported in interface RuntimeMXBean
      Returns:
      true if the Java virtual machine supports the class path mechanism; false otherwise.
    • getInputArguments

      public final List<String> getInputArguments()
      Returns the input arguments passed to the Java virtual machine which does not include the arguments to the main method. This method returns an empty list if there is no input argument to the Java virtual machine.

      Some Java virtual machine implementations may take input arguments from multiple different sources: for examples, arguments passed from the application that launches the Java virtual machine such as the 'java' command, environment variables, configuration files, etc.

      Typically, not all command-line options to the 'java' command are passed to the Java virtual machine. Thus, the returned input arguments may not include all command-line options.

      MBeanServer access:
      The mapped type of List<String> is String[].

      Specified by:
      getInputArguments in interface RuntimeMXBean
      Returns:
      a list of String objects; each element is an argument passed to the Java virtual machine.
    • getSystemProperties

      public final Map<String,String> getSystemProperties()
      Returns a map of names and values of all system properties. This method calls System.getProperties() to get all system properties. Properties whose name or value is not a String are omitted.

      MBeanServer access:
      The mapped type of Map<String,String> is TabularData with two items in each row as follows:

      Name and Type for each item
      Item Name Item Type
      key String
      value String
      Specified by:
      getSystemProperties in interface RuntimeMXBean
      Returns:
      a map of names and values of all system properties.
    • getObjectName

      public final ObjectName getObjectName()
      Returns an ObjectName instance representing the object name of this platform managed object.
      Specified by:
      getObjectName in interface PlatformManagedObject
      Returns:
      an ObjectName instance representing the object name of this platform managed object.