Class ConfigRetriever
- All Implemented Interfaces:
MutinyDelegate
ConfigStore
and tracks changes periodically.
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Clement Escoffier
- See Also:
-
ConfigRetriever
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfigRetriever(io.vertx.config.ConfigRetriever delegate) Create a new instance ofConfigRetrieverdelegating to the given (non-null) instance ofConfigRetriever.ConfigRetriever(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Closes the retriever.voidCloses the retriever.Closes the retriever.ReadStream<io.vertx.core.json.JsonObject>static ConfigRetrieverCreates an instance of the default implementation of theConfigRetriever, using the default settings (json file, system properties and environment variables).static ConfigRetrieverCreates an instance of the default implementation of theConfigRetriever.booleanio.vertx.core.json.JsonObjectGets the last computed configuration.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject>Reads the configuration from the differentConfigStoreand computes the final configuration.io.vertx.core.json.JsonObjectReads the configuration from the differentConfigStoreand computes the final configuration.Reads the configuration from the differentConfigStoreand computes the final configuration.io.vertx.config.ConfigRetrieverGet the delegate instance.inthashCode()voidRegisters a listener receiving configuration changes.static ConfigRetrievernewInstance(io.vertx.config.ConfigRetriever delegate) Creates a new instance of theConfigRetriever.setBeforeScanHandler(Runnable handler) Registers a handler called before every scan.setConfigurationProcessor(Function<io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject> processor) Registers a handler that process the configuration before being injected into#getConfig(Handler)or#listen(Handler).toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
ConfigRetriever
public ConfigRetriever(io.vertx.config.ConfigRetriever delegate) Create a new instance ofConfigRetrieverdelegating to the given (non-null) instance ofConfigRetriever. -
ConfigRetriever
-
-
Method Details
-
getDelegate
public io.vertx.config.ConfigRetriever getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
getConfig
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.core.json.JsonObject> getConfig()Reads the configuration from the differentConfigStoreand computes the final configuration.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ConfigRetriever.getConfig()
-
getConfigAndAwait
public io.vertx.core.json.JsonObject getConfigAndAwait()Reads the configuration from the differentConfigStoreand computes the final configuration.Unlike the bare Vert.x variant, this method returns a
JsonObject. This method awaits indefinitely 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 aRuntimeException).- Returns:
- The operation result
- See Also:
-
ConfigRetriever.getConfig()
-
getConfigAndForget
Reads the configuration from the differentConfigStoreand computes the final configuration.Unlike the bare Vert.x variant, this method ignores the
JsonObjectresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ConfigRetriever.getConfig()
-
close
Closes the retriever.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
ConfigRetriever.close()
-
closeAndAwait
public void closeAndAwait()Closes the retriever.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
ConfigRetriever.close()
-
closeAndForget
Closes the retriever.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
ConfigRetriever.close()
-
create
Creates an instance of the default implementation of theConfigRetriever.- Parameters:
vertx- the vert.x instanceoptions- the options, must not benull, must contain the list of configured store.- Returns:
- the created instance.
-
create
Creates an instance of the default implementation of theConfigRetriever, using the default settings (json file, system properties and environment variables).- Parameters:
vertx- the vert.x instance- Returns:
- the created instance.
-
getCachedConfig
public io.vertx.core.json.JsonObject getCachedConfig()Gets the last computed configuration.- Returns:
- the last configuration
-
listen
Registers a listener receiving configuration changes. This method cannot only be called if the configuration is broadcasted.- Parameters:
listener- the listener
-
setBeforeScanHandler
Registers a handler called before every scan. This method is mostly used for logging purpose.- Parameters:
handler- the handler, must not benull- Returns:
- the current config retriever
-
setConfigurationProcessor
public ConfigRetriever setConfigurationProcessor(Function<io.vertx.core.json.JsonObject, io.vertx.core.json.JsonObject> processor) Registers a handler that process the configuration before being injected into#getConfig(Handler)or#listen(Handler). This allows the code to customize the configuration.- Parameters:
processor- the processor, must not benull. The method must not returnnull. 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.- Returns:
- the current config retriever
-
configStream
- Returns:
- the stream of configurations. It's single stream (unicast) and that delivers the last known config and the successors periodically.
-
newInstance
Creates a new instance of theConfigRetriever. -
hashCode
public int hashCode() -
equals
-
toString
-