Class DriverEnvironment
java.lang.Object
eu.cloudnetservice.driver.DriverEnvironment
- All Implemented Interfaces:
Named, DefaultedDocPropertyHolder, DocPropertyHolder
Represents the current environment in which the driver is running. There are currently two default environments, the
node and wrapper which are statically represented in this class.
A driver environment can hold additional information in its json properties, these are however never persisted anywhere.
- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface DefaultedDocPropertyHolder
DefaultedDocPropertyHolder.Mutable<S> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringstatic final DriverEnvironmentThe jvm-static representation of the node environment.private final Documentstatic final DriverEnvironmentThe jvm-static representation of the wrapper environment. -
Constructor Summary
ConstructorsConstructorDescriptionDriverEnvironment(@NonNull String name, @NonNull Document properties) Constructs a new driver environment instance. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultedDocPropertyHolder
propertyAbsent, propertyPresent, readProperty, readPropertyOrDefault, readPropertyOrGet, readPropertyOrThrow, readPropertyOrThrow
-
Field Details
-
NODE
The jvm-static representation of the node environment. -
WRAPPER
The jvm-static representation of the wrapper environment. -
name
-
properties
-
-
Constructor Details
-
DriverEnvironment
Constructs a new driver environment instance.- Parameters:
name- the name of the environment.properties- the properties of the environment.- Throws:
NullPointerException- if the given name or properties are null.
-
-
Method Details
-
name
-
propertyHolder
Get the underlying document that all read and write operations are delegated to.- Specified by:
propertyHolderin interfaceDocPropertyHolder- Returns:
- the underlying document.
-