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 void
configure(Config arg0)
Process configuration settings.void
onProductRemoved(StorageEvent event)
Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_REMOVED
.void
onProductStored(StorageEvent event)
Dispatched method called when the type of event isStorageEvent.StorageEventType.PRODUCT_STORED
.void
onStorageEvent(StorageEvent event)
Simple dispatch method for listeners who are only interested in certain types ofStorageEvent
s.void
shutdown()
Stop any processing/background threads.void
startup()
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:DefaultConfigurable
Process configuration settings. Called before startup().- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classDefaultConfigurable
- Parameters:
arg0
- the Config object with settings.- Throws:
java.lang.Exception
- if configuration exceptions occur.
-
shutdown
public void shutdown() throws java.lang.Exception
Description copied from class:DefaultConfigurable
Stop any processing/background threads.- Specified by:
shutdown
in interfaceConfigurable
- Overrides:
shutdown
in classDefaultConfigurable
- Throws:
java.lang.Exception
- if exceptions occur while starting.
-
startup
public void startup() throws java.lang.Exception
Description copied from class:DefaultConfigurable
Start any processing/background threads.- Specified by:
startup
in interfaceConfigurable
- Overrides:
startup
in 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 ofStorageEvent
s.- Specified by:
onStorageEvent
in 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
-
-