Package io.vertx.config
Class ConfigChange
- java.lang.Object
-
- io.vertx.config.ConfigChange
-
public class ConfigChange extends Object
A structure representing a configuration change.- Author:
- Clement Escoffier
-
-
Constructor Summary
Constructors Constructor Description ConfigChange()Creates a new instance fromConfigChangeusing empty JSON Object for both the old and new configuration.ConfigChange(ConfigChange other)Creates a new instance ofConfigChangecopying the values stored in the given object.ConfigChange(JsonObject json)Creates a newConfigChangeinstance from the given JSON object.ConfigChange(JsonObject prevConf, JsonObject newConf)Creates a newConfigChangeinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObjectgetNewConfiguration()JsonObjectgetPreviousConfiguration()ConfigChangesetNewConfiguration(JsonObject conf)Sets the new configuration.ConfigChangesetPreviousConfiguration(JsonObject conf)Sets the previous configuration.JsonObjecttoJson()
-
-
-
Constructor Detail
-
ConfigChange
public ConfigChange(JsonObject prevConf, JsonObject newConf)
Creates a newConfigChangeinstance.- Parameters:
prevConf- the previous configuration, may benull. In this case, an empty JSON object is used.newConf- the new configuration, may benull. In this case, an empty JSON object is used.
-
ConfigChange
public ConfigChange()
Creates a new instance fromConfigChangeusing empty JSON Object for both the old and new configuration.
-
ConfigChange
public ConfigChange(ConfigChange other)
Creates a new instance ofConfigChangecopying the values stored in the given object.- Parameters:
other- the instance to copy
-
ConfigChange
public ConfigChange(JsonObject json)
Creates a newConfigChangeinstance from the given JSON object.- Parameters:
json- the json object, must not benull
-
-
Method Detail
-
getPreviousConfiguration
public JsonObject getPreviousConfiguration()
- Returns:
- the previous configuration, never
null, but potentially empty
-
setPreviousConfiguration
public ConfigChange setPreviousConfiguration(JsonObject conf)
Sets the previous configuration.- Parameters:
conf- the configuration, may benull. In this case an empty JSON object is used.- Returns:
- the current instance of
ConfigChange
-
getNewConfiguration
public JsonObject getNewConfiguration()
- Returns:
- the new configuration, never
null, but potentially empty.
-
setNewConfiguration
public ConfigChange setNewConfiguration(JsonObject conf)
Sets the new configuration.- Parameters:
conf- the new configuration, may benull. In this case, an empty JSON object is used.- Returns:
- the current instance of
ConfigChange
-
toJson
public JsonObject toJson()
- Returns:
- the JSON representation of the current
ConfigChangeinstance.
-
-