public interface ConfigEventListener
Listen to config events. This can handle metrics for the config
watcher.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe status of the event. -
Method Summary
Modifier and TypeMethodDescriptionvoidonConfigFileRead(net.morimekta.file.FileEvent fileEvent, Path filePath, ConfigEventListener.Status status) Called when the config file events are triggered.voidonConfigFileUpdate(ConfigChangeType changeType, Path filePath, String identifier, ConfigEventListener.Status status) Called on listeners whenever the content of a config is changed.
-
Method Details
-
onConfigFileRead
void onConfigFileRead(net.morimekta.file.FileEvent fileEvent, Path filePath, ConfigEventListener.Status status) Called when the config file events are triggered. Usually all files are modified at the same time, this is also on all files created and deleted.- Parameters:
fileEvent- The file event.filePath- The file affected.status- The config file read status.
-
onConfigFileUpdate
void onConfigFileUpdate(ConfigChangeType changeType, Path filePath, String identifier, ConfigEventListener.Status status) Called on listeners whenever the content of a config is changed. This is checked usingObject.equals(Object)on the config instance parsed for the same file path. The status is based on the result of calling the config change listeners. If any threw an exception, it is handled as ERROR, otherwise as OK.- Parameters:
changeType- The config change type.filePath- The file affected.identifier- The config's identifier, or filename if none.status- The config change status.
-