public class OverrideMessageSupplier<Message extends PMessage<Message,Field>,Field extends PField> extends Object implements ReloadableSupplier<Message>
Supplier<Service> supplier = new OverrideMessageSupplier<>(
baseServiceConfig,
ImmutableMap.of(
"db.username", "root",
"jdbc.driver", "com.oracle.jdbc.Driver"
));
| Constructor and Description |
|---|
OverrideMessageSupplier(Supplier<Message> parent,
Map<String,String> overrides)
Create a config that wraps a providence message instance.
|
OverrideMessageSupplier(Supplier<Message> parent,
Map<String,String> overrides,
boolean strict)
Create a config that wraps a providence message instance.
|
OverrideMessageSupplier(Supplier<Message> parent,
Properties overrides)
Create a config that wraps a providence message instance.
|
| Modifier and Type | Method and Description |
|---|---|
Message |
get()
Get the message enclosed in the config wrapper.
|
void |
reload()
Reload the message into the config.
|
public OverrideMessageSupplier(Supplier<Message> parent, Properties overrides) throws net.morimekta.config.ConfigException
parent - The parent message to override values of.overrides - The message override values.net.morimekta.config.ConfigException - If message overriding failedpublic OverrideMessageSupplier(Supplier<Message> parent, Map<String,String> overrides) throws net.morimekta.config.ConfigException
parent - The parent message to override values of.overrides - The message override values.net.morimekta.config.ConfigException - If message overriding failedpublic OverrideMessageSupplier(Supplier<Message> parent, Map<String,String> overrides, boolean strict) throws net.morimekta.config.ConfigException
parent - The parent message to override values of.overrides - The message override values.strict - If config should be read strictly.net.morimekta.config.ConfigException - If message overriding failedpublic Message get()
Copyright © 2015–2017 morimekta.net. All rights reserved.