Class YamlConfigurator

  • All Implemented Interfaces:
    io.gridgo.config.Configurator, io.gridgo.framework.ComponentLifecycle, io.gridgo.framework.EventDispatcher<io.gridgo.config.event.ConfigurationEvent>, io.gridgo.framework.NamedComponent, io.gridgo.utils.helper.Loggable

    public class YamlConfigurator
    extends io.gridgo.config.impl.AbstractLocalConfigurator
    • Constructor Summary

      Constructors 
      Constructor Description
      YamlConfigurator​(org.yaml.snakeyaml.Yaml config)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String generateName()  
      static YamlConfigurator ofConfig​(org.yaml.snakeyaml.Yaml config)  
      static YamlConfigurator ofEmpty()  
      static YamlConfigurator ofFile​(java.io.File file)  
      static YamlConfigurator ofFile​(java.lang.String file)  
      static YamlConfigurator ofReader​(java.io.Reader reader)  
      static YamlConfigurator ofResource​(java.lang.String resource)  
      static YamlConfigurator ofStream​(java.io.InputStream is)  
      static YamlConfigurator ofString​(java.lang.String s)  
      protected java.util.Optional<io.gridgo.bean.BElement> resolve()  
      • Methods inherited from class io.gridgo.config.impl.AbstractLocalConfigurator

        onStart, onStop
      • Methods inherited from class io.gridgo.config.impl.AbstractConfigurator

        get, publishFailed, publishLoaded, publishReloaded
      • Methods inherited from class io.gridgo.framework.impl.ReplayEventDispatcher

        publish, subscribe
      • Methods inherited from class io.gridgo.framework.impl.AbstractComponentLifecycle

        getName, isStarted, start, stop, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.gridgo.framework.ComponentLifecycle

        isStarted, start, stop
      • Methods inherited from interface io.gridgo.framework.EventDispatcher

        publish, subscribe
      • Methods inherited from interface io.gridgo.utils.helper.Loggable

        getLogger, getLogger
      • Methods inherited from interface io.gridgo.framework.NamedComponent

        getName
    • Constructor Detail

      • YamlConfigurator

        public YamlConfigurator​(org.yaml.snakeyaml.Yaml config)
    • Method Detail

      • ofConfig

        public static final YamlConfigurator ofConfig​(org.yaml.snakeyaml.Yaml config)
      • ofReader

        public static final YamlConfigurator ofReader​(java.io.Reader reader)
      • ofStream

        public static final YamlConfigurator ofStream​(java.io.InputStream is)
      • ofResource

        public static final YamlConfigurator ofResource​(java.lang.String resource)
      • ofFile

        public static final YamlConfigurator ofFile​(java.io.File file)
                                             throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • ofFile

        public static final YamlConfigurator ofFile​(java.lang.String file)
                                             throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
      • ofString

        public static final YamlConfigurator ofString​(java.lang.String s)
      • resolve

        protected java.util.Optional<io.gridgo.bean.BElement> resolve()
        Specified by:
        resolve in class io.gridgo.config.impl.AbstractLocalConfigurator
      • generateName

        protected java.lang.String generateName()
        Specified by:
        generateName in class io.gridgo.framework.impl.AbstractComponentLifecycle