Class ProvidenceConfigSupplier<Message extends net.morimekta.providence.PMessage<Message,Field>,Field extends net.morimekta.providence.descriptor.PField>
- java.lang.Object
-
- net.morimekta.providence.config.impl.UpdatingConfigSupplier<Message,Field>
-
- net.morimekta.providence.config.impl.ProvidenceConfigSupplier<Message,Field>
-
- All Implemented Interfaces:
java.util.function.Supplier<Message>,ConfigSupplier<Message,Field>
public class ProvidenceConfigSupplier<Message extends net.morimekta.providence.PMessage<Message,Field>,Field extends net.morimekta.providence.descriptor.PField> extends UpdatingConfigSupplier<Message,Field>
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 ProvidenceConfigSupplier(java.io.File configFile, ConfigSupplier<Message,Field> parentSupplier, net.morimekta.util.FileWatcher fileWatcher, ProvidenceConfigParser 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 interface net.morimekta.providence.config.ConfigSupplier
snapshot
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class net.morimekta.providence.config.impl.UpdatingConfigSupplier
addListener, configTimestamp, get, removeListener, set
-
-
-
-
Constructor Detail
-
ProvidenceConfigSupplier
public ProvidenceConfigSupplier(@Nonnull java.io.File configFile, @Nullable ConfigSupplier<Message,Field> parentSupplier, @Nullable net.morimekta.util.FileWatcher fileWatcher, @Nonnull ProvidenceConfigParser configParser, @Nonnull java.time.Clock clock) throws ProvidenceConfigException- Throws:
ProvidenceConfigException
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getName
public java.lang.String getName()
Description copied from interface:ConfigSupplierGet a simple descriptive name for this config supplier.- Returns:
- The supplier name.
-
-