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 fromConfigChange
using empty JSON Object for both the old and new configuration.ConfigChange(ConfigChange other)
Creates a new instance ofConfigChange
copying the values stored in the given object.ConfigChange(JsonObject json)
Creates a newConfigChange
instance from the given JSON object.ConfigChange(JsonObject prevConf, JsonObject newConf)
Creates a newConfigChange
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonObject
getNewConfiguration()
JsonObject
getPreviousConfiguration()
ConfigChange
setNewConfiguration(JsonObject conf)
Sets the new configuration.ConfigChange
setPreviousConfiguration(JsonObject conf)
Sets the previous configuration.JsonObject
toJson()
-
-
-
Constructor Detail
-
ConfigChange
public ConfigChange(JsonObject prevConf, JsonObject newConf)
Creates a newConfigChange
instance.- 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 fromConfigChange
using empty JSON Object for both the old and new configuration.
-
ConfigChange
public ConfigChange(ConfigChange other)
Creates a new instance ofConfigChange
copying the values stored in the given object.- Parameters:
other
- the instance to copy
-
ConfigChange
public ConfigChange(JsonObject json)
Creates a newConfigChange
instance 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
ConfigChange
instance.
-
-