Package eu.cloudnetservice.driver
Class DriverEnvironment
java.lang.Object
eu.cloudnetservice.driver.DriverEnvironment
- All Implemented Interfaces:
eu.cloudnetservice.common.document.property.DefaultedDocPropertyHolder<eu.cloudnetservice.common.document.gson.JsonDocument,,DriverEnvironment> eu.cloudnetservice.common.document.property.DocPropertyHolder<eu.cloudnetservice.common.document.gson.JsonDocument,,DriverEnvironment> eu.cloudnetservice.common.Nameable
public final class DriverEnvironment
extends Object
implements eu.cloudnetservice.common.document.property.DefaultedDocPropertyHolder<eu.cloudnetservice.common.document.gson.JsonDocument,DriverEnvironment>, eu.cloudnetservice.common.Nameable
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringstatic final DriverEnvironmentThe jvm-static representation of the node environment.private final eu.cloudnetservice.common.document.gson.JsonDocumentstatic final DriverEnvironmentThe jvm-static representation of the wrapper environment. -
Constructor Summary
ConstructorsConstructorDescriptionDriverEnvironment(@NonNull String name, @NonNull eu.cloudnetservice.common.document.gson.JsonDocument properties) Constructs a new driver environment instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.cloudnetservice.common.document.property.DefaultedDocPropertyHolder
propertyAbsent, propertyPresent, readProperty, readPropertyOrDefault, readPropertyOrGet, readPropertyOrThrow, readPropertyOrThrow, removeProperty, writeProperty, writePropertyIfAbsent, writePropertyIfAbsent, writePropertyIfPresent, writePropertyIfPresent
-
Field Details
-
NODE
The jvm-static representation of the node environment. -
WRAPPER
The jvm-static representation of the wrapper environment. -
name
-
properties
private final eu.cloudnetservice.common.document.gson.JsonDocument properties
-
-
Constructor Details
-
DriverEnvironment
public DriverEnvironment(@NonNull @NonNull String name, @NonNull @NonNull eu.cloudnetservice.common.document.gson.JsonDocument properties) 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
- Specified by:
namein interfaceeu.cloudnetservice.common.Nameable
-
propertyHolder
- Specified by:
propertyHolderin interfaceeu.cloudnetservice.common.document.property.DocPropertyHolder<eu.cloudnetservice.common.document.gson.JsonDocument,DriverEnvironment>
-