Class ResourceConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>>
- java.lang.Object
-
- net.morimekta.providence.config.impl.FixedConfigSupplier<Message>
-
- net.morimekta.providence.config.impl.ResourceConfigSupplier<Message>
-
- All Implemented Interfaces:
java.util.function.Supplier<Message>,ConfigSupplier<Message>
public class ResourceConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>> extends FixedConfigSupplier<Message>
A supplier to get a config (aka message) from a providence config. This is essentially the initiator for the config. It will always have a config message instance, and will log (error) if it later fails to load an updated config.
-
-
Constructor Summary
Constructors Constructor Description ResourceConfigSupplier(java.nio.file.Path resourcePath, ConfigParser configParser, java.time.Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Get a simple descriptive name for this config supplier.java.lang.StringtoString()-
Methods inherited from class net.morimekta.providence.config.impl.FixedConfigSupplier
addListener, configTimestamp, get, getClock, reference, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.morimekta.providence.config.ConfigSupplier
override, override, snapshot
-
-
-
-
Constructor Detail
-
ResourceConfigSupplier
public ResourceConfigSupplier(@Nonnull java.nio.file.Path resourcePath, @Nonnull ConfigParser configParser, @Nonnull java.time.Clock clock) throws ConfigException- Throws:
ConfigException
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classFixedConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>>
-
getName
public java.lang.String getName()
Description copied from interface:ConfigSupplierGet a simple descriptive name for this config supplier.- Specified by:
getNamein interfaceConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>>- Overrides:
getNamein classFixedConfigSupplier<Message extends net.morimekta.providence.PMessage<Message>>- Returns:
- The supplier name.
-
-