Modifier and Type | Field and Description |
---|---|
static TypeArg<ConfigRetriever> |
__TYPE_ARG |
Constructor and Description |
---|
ConfigRetriever(ConfigRetriever 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 . |
JsonObject |
getCachedConfig()
Gets the last computed configuration.
|
void |
getConfig(Handler<AsyncResult<JsonObject>> completionHandler)
Reads the configuration from the different
and computes the final configuration.
|
static Future<JsonObject> |
getConfigAsFuture(ConfigRetriever retriever)
Same as
getConfig(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>>) , but returning a object. |
ConfigRetriever |
getDelegate() |
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.
|
public static final TypeArg<ConfigRetriever> __TYPE_ARG
public ConfigRetriever(ConfigRetriever 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 static Future<JsonObject> getConfigAsFuture(ConfigRetriever retriever)
getConfig(io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.json.JsonObject>>)
, but returning a object. The result is a
.retriever
- the config retrievepublic void getConfig(Handler<AsyncResult<JsonObject>> completionHandler)
completionHandler
- handler receiving the computed configuration, or a failure if the configuration cannot be retrievedpublic Single<JsonObject> rxGetConfig()
public void close()
public JsonObject getCachedConfig()
public void listen(Handler<ConfigChange> listener)
listener
- the listenerpublic ReadStream<JsonObject> configStream()
public static ConfigRetriever newInstance(ConfigRetriever arg)
Copyright © 2017. All rights reserved.