Package com.fauna.env
Class DriverEnvironment
- java.lang.Object
-
- com.fauna.env.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.
-
Constructor Summary
Constructors Constructor Description DriverEnvironment(DriverEnvironment.JvmDriver jvmDriver)
Constructs aDriverEnvironment
instance with the specified JVM driver type.
-
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.
-
-
-
Constructor Detail
-
DriverEnvironment
public DriverEnvironment(DriverEnvironment.JvmDriver jvmDriver)
Constructs aDriverEnvironment
instance with the specified JVM driver type.- Parameters:
jvmDriver
- TheDriverEnvironment.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 classjava.lang.Object
- Returns:
- A
String
representation of thisDriverEnvironment
.
-
-