Package gov.usgs.util
Class DefaultConfigurable
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- All Implemented Interfaces:
Configurable
- Direct Known Subclasses:
AbstractListener,AdminSocketServer,ArchivePolicy,AwsProductSender,CLIProductBuilder,DebugProductSender,DefaultIndexerModule,DefaultNotificationReceiver,DefaultStorageListener,ExecutorListenerNotifier,FileProductStorage,FileTrackingListener,JDBCConnection,ProductBuilder,ProductClient,ProductKey,RoundRobinListenerNotifier,SearchServerSocket,SignatureVerifier,SocketProductSender
public class DefaultConfigurable extends java.lang.Object implements Configurable
Default implementation of all methods on the Configurable interface. Classes may override individual methods as needed.
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigurable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Config config)Process configuration settings.java.lang.StringgetName()Get this object name.voidsetName(java.lang.String name)Set this object name.voidshutdown()Stop any processing/background threads.voidstartup()Start any processing/background threads.
-
-
-
Method Detail
-
configure
public void configure(Config config) throws java.lang.Exception
Process configuration settings. Called before startup().- Specified by:
configurein interfaceConfigurable- Parameters:
config- the Config object with settings.- Throws:
java.lang.Exception- if configuration exceptions occur.
-
startup
public void startup() throws java.lang.ExceptionStart any processing/background threads.- Specified by:
startupin interfaceConfigurable- Throws:
java.lang.Exception- if exceptions occur while starting.
-
shutdown
public void shutdown() throws java.lang.ExceptionStop any processing/background threads.- Specified by:
shutdownin interfaceConfigurable- Throws:
java.lang.Exception- if exceptions occur while starting.
-
getName
public java.lang.String getName()
Description copied from interface:ConfigurableGet this object name.- Specified by:
getNamein interfaceConfigurable- Returns:
- the name.
-
setName
public void setName(java.lang.String name)
Description copied from interface:ConfigurableSet 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:
setNamein interfaceConfigurable- Parameters:
name- the name.
-
-