Package gov.usgs.util

Class DefaultConfigurable

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configure​(Config config)
      Process configuration settings.
      java.lang.String getName()
      Get this object name.
      void setName​(java.lang.String name)
      Set this object name.
      void shutdown()
      Stop any processing/background threads.
      void startup()
      Start any processing/background threads.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultConfigurable

        public DefaultConfigurable()
    • Method Detail

      • configure

        public void configure​(Config config)
                       throws java.lang.Exception
        Process configuration settings. Called before startup().
        Specified by:
        configure in interface Configurable
        Parameters:
        config - the Config object with settings.
        Throws:
        java.lang.Exception - if configuration exceptions occur.
      • startup

        public void startup()
                     throws java.lang.Exception
        Start any processing/background threads.
        Specified by:
        startup in interface Configurable
        Throws:
        java.lang.Exception - if exceptions occur while starting.
      • shutdown

        public void shutdown()
                      throws java.lang.Exception
        Stop any processing/background threads.
        Specified by:
        shutdown in interface Configurable
        Throws:
        java.lang.Exception - if exceptions occur while starting.
      • getName

        public java.lang.String getName()
        Description copied from interface: Configurable
        Get this object name.
        Specified by:
        getName in interface Configurable
        Returns:
        the name.
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: Configurable
        Set this object name. This method is typically called by a Config object when the configurable object is loaded out of a config file. name will be set to the config section.
        Specified by:
        setName in interface Configurable
        Parameters:
        name - the name.