Class SysInfo

java.lang.Object
org.craftercms.commons.monitoring.VersionInfo
org.craftercms.commons.monitoring.SysInfo

public final class SysInfo extends VersionInfo
Get current version information about: 1. Current VM version runs current code. 2. Build Information from a given manifest file. 3. Name and version from a given manifest file.
  • Method Details

    • getInfo

      public static SysInfo getInfo(Manifest manifest)
      Gets the current SysInfo based on Manifest and current JVM information.
      Parameters:
      manifest - Manifest were to get the information.
      Returns:
      A SysInfo pojo with information.
    • getInfo

      public static SysInfo getInfo(Class<?> clazz) throws IOException
      Gets the current SysInfo base on a Class that will load it's manifest file.
      Parameters:
      clazz - Class that will load the manifest MF file
      Returns:
      A SysInfo pojo with the information.
      Throws:
      IOException - If Unable to read the Manifest file.
    • toString

      public String toString()
      Overrides:
      toString in class VersionInfo
    • getJavaVersion

      public String getJavaVersion()
    • getJavaVendor

      public String getJavaVendor()
    • getJavaVm

      public String getJavaVm()
    • getOsName

      public String getOsName()
    • getOsVersion

      public String getOsVersion()
    • getOsArch

      public String getOsArch()