DefaultConfigurable.java

  1. package gov.usgs.util;

  2. /**
  3.  * Default implementation of all methods on the Configurable interface.
  4.  *
  5.  * Classes may override individual methods as needed.
  6.  */
  7. public class DefaultConfigurable implements Configurable {

  8.   /** Name of this configurable object. */
  9.   private String name;

  10.   /**
  11.    * Process configuration settings.
  12.    *
  13.    * Called before startup().
  14.    *
  15.    * @param config the Config object with settings.
  16.    */
  17.   @Override
  18.   public void configure(Config config) throws Exception {
  19.   }

  20.   /**
  21.    * Start any processing/background threads.
  22.    */
  23.   @Override
  24.   public void startup() throws Exception {
  25.   }

  26.   /**
  27.    * Stop any processing/background threads.
  28.    */
  29.   @Override
  30.   public void shutdown() throws Exception {
  31.   }

  32.   /**
  33.    * @return the name.
  34.    */
  35.   @Override
  36.   public String getName() {
  37.     return name;
  38.   }

  39.   /**
  40.    * @param name the name.
  41.    */
  42.   @Override
  43.   public void setName(String name) {
  44.     this.name = name;
  45.   }

  46. }