Class ConfigRetriever


  • public class ConfigRetriever
    extends Object
    Defines a configuration retriever that read configuration from and tracks changes periodically.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • ConfigRetriever

        public ConfigRetriever​(io.vertx.config.ConfigRetriever delegate)
      • ConfigRetriever

        public ConfigRetriever​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.config.ConfigRetriever getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • create

        public static ConfigRetriever create​(Vertx vertx,
                                             io.vertx.config.ConfigRetrieverOptions options)
        Parameters:
        vertx - the vert.x instance
        options - the options, must not be null, must contain the list of configured store.
        Returns:
        the created instance.
      • create

        public static ConfigRetriever create​(Vertx vertx)
        Parameters:
        vertx - the vert.x instance
        Returns:
        the created instance.
      • getConfig

        public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> getConfig()
        Reads the configuration from the different and computes the final configuration.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • getConfigAndAwait

        public io.vertx.core.json.JsonObject getConfigAndAwait()
        Blocking variant of getConfig().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the JsonObject instance produced by the operation.
      • getConfigAndForget

        public void getConfigAndForget()
        Variant of getConfig() that ignores the result of the operation.

        This method subscribes on the result of getConfig(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from getConfig() but you don't need to compose it with other operations.

      • close

        public void close()
      • getCachedConfig

        public io.vertx.core.json.JsonObject getCachedConfig()
        Returns:
        the last configuration
      • listen

        public void listen​(Consumer<io.vertx.config.ConfigChange> listener)
        Parameters:
        listener - the listener
      • setBeforeScanHandler

        public ConfigRetriever setBeforeScanHandler​(Runnable handler)
        Parameters:
        handler - the handler, must not be null
        Returns:
      • setConfigurationProcessor

        public ConfigRetriever setConfigurationProcessor​(Function<io.vertx.core.json.JsonObject,​io.vertx.core.json.JsonObject> processor)
        Parameters:
        processor - the processor, must not be null. The method must not return null. The returned configuration is used. If the processor does not update the configuration, it must return the input configuration. If the processor throws an exception, the failure is passed to the getConfig() handler.
        Returns:
        the current config retriever
      • configStream

        public ReadStream<io.vertx.core.json.JsonObject> configStream()
        Returns:
        the stream of configurations. It's single stream (unicast) and that delivers the last known config and the successors periodically.
      • newInstance

        public static ConfigRetriever newInstance​(io.vertx.config.ConfigRetriever arg)