M - The message type.public class TestConfigSupplier<M extends net.morimekta.providence.PMessage<M>> extends UpdatingConfigSupplier<M>
| Constructor and Description |
|---|
TestConfigSupplier(Clock clock,
M initialConfig)
Start with an initial config value.
|
TestConfigSupplier(M initialConfig)
Start with an initial config value.
|
TestConfigSupplier(String initialResource,
net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor)
Start with an initial config value.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Get a simple descriptive name for this config supplier.
|
void |
testUpdate(M newInstance)
Update the current config and trigger updates.
|
void |
testUpdate(String resourceName)
Update the current config and trigger updates.
|
String |
toString() |
addListener, configTimestamp, get, getClock, reference, removeListener, setclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitoverride, override, snapshotpublic TestConfigSupplier(@Nonnull String initialResource, net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor) throws ConfigException
initialResource - The initial config value.descriptor - The message descriptor.ConfigException - If unable to load the config.public TestConfigSupplier(@Nonnull M initialConfig)
initialConfig - The initial config value.public void testUpdate(@Nonnull M newInstance)
newInstance - The new config instance.public void testUpdate(@Nonnull String resourceName) throws ConfigException
resourceName - The new config resource name.ConfigException - If the loaded config is not valid.public String getName()
ConfigSupplierCopyright © 2015–2020 morimekta.net. All rights reserved.