Package gov.usgs.earthquake.distribution
Class DefaultStorageListener
- java.lang.Object
-
- gov.usgs.util.DefaultConfigurable
-
- gov.usgs.earthquake.distribution.DefaultStorageListener
-
- All Implemented Interfaces:
StorageListener,Configurable
- Direct Known Subclasses:
ReplicationStorageListener
public class DefaultStorageListener extends DefaultConfigurable implements StorageListener
-
-
Constructor Summary
Constructors Constructor Description DefaultStorageListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(Config arg0)Process configuration settings.voidonProductRemoved(StorageEvent event)Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_REMOVED.voidonProductStored(StorageEvent event)Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_STORED.voidonStorageEvent(StorageEvent event)Simple dispatch method for listeners who are only interested in certain types ofStorageEvents.voidshutdown()Stop any processing/background threads.voidstartup()Start any processing/background threads.-
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.usgs.util.Configurable
getName, setName
-
-
-
-
Method Detail
-
configure
public void configure(Config arg0) throws java.lang.Exception
Description copied from class:DefaultConfigurableProcess configuration settings. Called before startup().- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classDefaultConfigurable- Parameters:
arg0- the Config object with settings.- Throws:
java.lang.Exception- if configuration exceptions occur.
-
shutdown
public void shutdown() throws java.lang.ExceptionDescription copied from class:DefaultConfigurableStop any processing/background threads.- Specified by:
shutdownin interfaceConfigurable- Overrides:
shutdownin classDefaultConfigurable- Throws:
java.lang.Exception- if exceptions occur while starting.
-
startup
public void startup() throws java.lang.ExceptionDescription copied from class:DefaultConfigurableStart any processing/background threads.- Specified by:
startupin interfaceConfigurable- Overrides:
startupin classDefaultConfigurable- Throws:
java.lang.Exception- if exceptions occur while starting.
-
onStorageEvent
public void onStorageEvent(StorageEvent event)
Simple dispatch method for listeners who are only interested in certain types ofStorageEvents.- Specified by:
onStorageEventin interfaceStorageListener- Parameters:
event- The event that triggered the call
-
onProductStored
public void onProductStored(StorageEvent event) throws java.lang.Exception
Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_STORED.- Parameters:
event- The event that triggered the call- Throws:
java.lang.Exception- if error occurs
-
onProductRemoved
public void onProductRemoved(StorageEvent event) throws java.lang.Exception
Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_REMOVED.- Parameters:
event- The event that triggered the call- Throws:
java.lang.Exception- if error occurs
-
-