public interface ConfigRetriever
ConfigStore
 and tracks changes periodically.| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Closes the retriever. 
 | 
ReadStream<JsonObject> | 
configStream()  | 
static ConfigRetriever | 
create(Vertx vertx)
Creates an instance of the default implementation of the  
ConfigRetriever, using the default
 settings (json file, system properties and environment variables). | 
static ConfigRetriever | 
create(Vertx vertx,
      ConfigRetrieverOptions options)
Creates an instance of the default implementation of the  
ConfigRetriever. | 
JsonObject | 
getCachedConfig()
Gets the last computed configuration. 
 | 
void | 
getConfig(Handler<AsyncResult<JsonObject>> completionHandler)
Reads the configuration from the different  
ConfigStore
 and computes the final configuration. | 
static Future<JsonObject> | 
getConfigAsFuture(ConfigRetriever retriever)
Deprecated. 
 
removed in Vert.x 4 for  
ConfigRetriever#getConfig() method that returns a Future<JsonObject>
             in 3.x you can use instead Future.future(retriever::getConfig) | 
void | 
listen(Handler<ConfigChange> listener)
Registers a listener receiving configuration changes. 
 | 
ConfigRetriever | 
setBeforeScanHandler(Handler<Void> function)
Registers a handler called before every scan. 
 | 
ConfigRetriever | 
setConfigurationProcessor(java.util.function.Function<JsonObject,JsonObject> processor)
Registers a handler that process the configuration before being injected into  
getConfig(Handler) or listen(Handler). | 
static ConfigRetriever create(Vertx vertx, ConfigRetrieverOptions options)
ConfigRetriever.vertx - the vert.x instanceoptions - the options, must not be null, must contain the list of configured store.static ConfigRetriever create(Vertx vertx)
ConfigRetriever, using the default
 settings (json file, system properties and environment variables).vertx - the vert.x instance@Deprecated static Future<JsonObject> getConfigAsFuture(ConfigRetriever retriever)
ConfigRetriever#getConfig() method that returns a Future<JsonObject>
             in 3.x you can use instead Future.future(retriever::getConfig)retriever - the config retrievevoid getConfig(Handler<AsyncResult<JsonObject>> completionHandler)
ConfigStore
 and computes the final configuration.completionHandler - handler receiving the computed configuration, or a failure if the
                          configuration cannot be retrievedvoid close()
JsonObject getCachedConfig()
void listen(Handler<ConfigChange> listener)
listener - the listenerConfigRetriever setBeforeScanHandler(Handler<Void> function)
function - the function, must not be nullConfigRetriever setConfigurationProcessor(java.util.function.Function<JsonObject,JsonObject> processor)
getConfig(Handler) or listen(Handler). This allows
 the code to customize the configuration.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) handler.ReadStream<JsonObject> configStream()
Copyright © 2020 Eclipse. All rights reserved.