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 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.
-
-
-
Method Detail
-
configure
public void configure(Config config) throws java.lang.Exception
Process configuration settings. Called before startup().- Specified by:
configure
in interfaceConfigurable
- 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 interfaceConfigurable
- 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 interfaceConfigurable
- 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 interfaceConfigurable
- 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 interfaceConfigurable
- Parameters:
name
- the name.
-
-