Class ConfigChange

java.lang.Object
io.vertx.config.ConfigChange

public class ConfigChange extends Object
A structure representing a configuration change.
Author:
Clement Escoffier
  • Constructor Details

    • ConfigChange

      public ConfigChange(JsonObject prevConf, JsonObject newConf)
      Creates a new ConfigChange instance.
      Parameters:
      prevConf - the previous configuration, may be null. In this case, an empty JSON object is used.
      newConf - the new configuration, may be null. In this case, an empty JSON object is used.
    • ConfigChange

      public ConfigChange()
      Creates a new instance from ConfigChange using empty JSON Object for both the old and new configuration.
    • ConfigChange

      public ConfigChange(ConfigChange other)
      Creates a new instance of ConfigChange copying the values stored in the given object.
      Parameters:
      other - the instance to copy
    • ConfigChange

      public ConfigChange(JsonObject json)
      Creates a new ConfigChange instance from the given JSON object.
      Parameters:
      json - the json object, must not be null
  • Method Details

    • 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 be null. 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 be null. 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.