Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<ConfigRetriever> |
__TYPE_ARG |
Constructor and Description |
---|
ConfigRetriever(ConfigRetriever delegate) |
ConfigRetriever(Object delegate) |
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 . |
boolean |
equals(Object o) |
JsonObject |
getCachedConfig()
Gets the last computed configuration.
|
Single<JsonObject> |
getConfig()
Reads the configuration from the different
and computes the final configuration.
|
ConfigRetriever |
getDelegate() |
int |
hashCode() |
void |
listen(Handler<ConfigChange> listener)
Registers a listener receiving configuration changes.
|
static ConfigRetriever |
newInstance(ConfigRetriever arg) |
Single<JsonObject> |
rxGetConfig()
Reads the configuration from the different
and computes the final configuration.
|
ConfigRetriever |
setBeforeScanHandler(Handler<Void> handler)
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() or listen(io.vertx.core.Handler<io.vertx.config.ConfigChange>) . |
String |
toString() |
public static final io.vertx.lang.rx.TypeArg<ConfigRetriever> __TYPE_ARG
public ConfigRetriever(ConfigRetriever delegate)
public ConfigRetriever(Object delegate)
public ConfigRetriever getDelegate()
public 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.public static ConfigRetriever create(Vertx vertx)
ConfigRetriever
, using the default
settings (json file, system properties and environment variables).vertx
- the vert.x instancepublic Single<JsonObject> getConfig()
public Single<JsonObject> rxGetConfig()
public void close()
public JsonObject getCachedConfig()
public void listen(Handler<ConfigChange> listener)
listener
- the listenerpublic ConfigRetriever setBeforeScanHandler(Handler<Void> handler)
handler
- the handler, must not be null
public ConfigRetriever setConfigurationProcessor(java.util.function.Function<JsonObject,JsonObject> processor)
getConfig()
or listen(io.vertx.core.Handler<io.vertx.config.ConfigChange>)
. 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.public ReadStream<JsonObject> configStream()
public static ConfigRetriever newInstance(ConfigRetriever arg)
Copyright © 2021 Eclipse. All rights reserved.