Package com.fauna.env
Class DriverEnvironment
- java.lang.Object
-
- com.fauna.env.DriverEnvironment
-
public class DriverEnvironment extends java.lang.ObjectProvides information about the runtime environment of the Fauna driver.The
DriverEnvironmentclass 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 classDriverEnvironment.JvmDriverEnum representing the supported JVM drivers.
-
Constructor Summary
Constructors Constructor Description DriverEnvironment(DriverEnvironment.JvmDriver jvmDriver)Constructs aDriverEnvironmentinstance with the specified JVM driver type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetVersion()Retrieves the software version from the "version.properties" file.java.lang.StringtoString()Returns a string representation of the driver environment, including the driver version, runtime, environment, and operating system.
-
-
-
Constructor Detail
-
DriverEnvironment
public DriverEnvironment(DriverEnvironment.JvmDriver jvmDriver)
Constructs aDriverEnvironmentinstance with the specified JVM driver type.- Parameters:
jvmDriver- TheDriverEnvironment.JvmDrivertype 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
Stringrepresenting 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:
toStringin classjava.lang.Object- Returns:
- A
Stringrepresentation of thisDriverEnvironment.
-
-