Package com.fauna.env

Class DriverEnvironment


  • public class DriverEnvironment
    extends java.lang.Object
    Provides information about the runtime environment of the Fauna driver.

    The DriverEnvironment class detects the environment, operating system, runtime version, and driver version, which can be helpful for diagnostics and compatibility checks.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DriverEnvironment.JvmDriver
      Enum representing the supported JVM drivers.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getVersion()
      Retrieves the software version from the "version.properties" file.
      java.lang.String toString()
      Returns a string representation of the driver environment, including the driver version, runtime, environment, and operating system.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DriverEnvironment

        public DriverEnvironment​(DriverEnvironment.JvmDriver jvmDriver)
        Constructs a DriverEnvironment instance with the specified JVM driver type.
        Parameters:
        jvmDriver - The DriverEnvironment.JvmDriver type to identify the runtime (e.g., Java or Scala).
    • Method Detail

      • getVersion

        public static java.lang.String getVersion()
        Retrieves the software version from the "version.properties" file.
        Returns:
        A String representing the software version.
        Throws:
        java.lang.RuntimeException - If the "version.properties" file is not found or if there is an issue reading the file.
      • toString

        public java.lang.String toString()
        Returns a string representation of the driver environment, including the driver version, runtime, environment, and operating system.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String representation of this DriverEnvironment.