Package gov.usgs.earthquake.distribution
Class EIDSNotificationSender
java.lang.Object
gov.usgs.util.DefaultConfigurable
gov.usgs.earthquake.product.AbstractListener
gov.usgs.earthquake.distribution.DefaultNotificationListener
gov.usgs.earthquake.distribution.DefaultNotificationSender
gov.usgs.earthquake.distribution.EIDSNotificationSender
- All Implemented Interfaces:
NotificationIndexCleanup.Listener,NotificationListener,Configurable
Class that works with EIDS interface and format for sending This class
generally works by polling a specified directory and then when a files shows
up in that directory it sends it
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault directory where notifications are sent.static final StringProperty referencing directory where notifications are "sent".Fields inherited from class gov.usgs.earthquake.distribution.DefaultNotificationSender
DEFAULT_PRODUCT_STORAGE_MAX_AGE, PRODUCT_STORAGE_MAX_AGE_PROPERTY, PRODUCT_STORAGE_PROPERTY, productStorage, productStorageMaxAge, SERVER_HOST_PROPERTY, SERVER_PORT_PROPERTY, serverHost, serverPortFields inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
CLEANUP_INTERVAL_PROPERTY, CONCURRENT_PRODUCTS_PROPERTY, DEFAULT_CLEANUP_INTERVAL, DEFAULT_CONCURRENT_PRODUCTS, DEFAULT_PROCESS_DUPLICATES, EXCLUDE_PATHS_PROPERTY, INCLUDE_PATHS_PROPERTY, INDEX_FILE_PROPERTY, NOTIFICATION_INDEX_PROPERTY, PROCESS_DUPLICATESFields inherited from class gov.usgs.earthquake.product.AbstractListener
ATTEMPT_COUNT_PROPERTY, DEFAULT_ATTEMPT_COUNT, DEFAULT_RETRY_DELAY, DEFAULT_TIMEOUT, EXCLUDE_SOURCES_PROPERTY, EXCLUDE_TYPES_PROPERTY, INCLUDE_ACTUALS_PROPERTY, INCLUDE_DEVELOPMENTS_PROPERTY, INCLUDE_INTERNALS_PROPERTY, INCLUDE_SCENARIOS_PROPERTY, INCLUDE_SOURCES_PROPERTY, INCLUDE_TESTS_PROPERTY, INCLUDE_TYPES_PROPERTY, MAX_TRIES_PROPERTY, RETRY_DELAY_PROPERTY, TIMEOUT_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures based on configuration section.protected voidsendNotification(Notification notification) Utility method to do the actual notification sending.voidsetServerPolldir(File serverPolldir) voidshutdown()Shut down storagevoidstartup()Start up storageMethods inherited from class gov.usgs.earthquake.distribution.DefaultNotificationSender
getProductStorage, getProductStorageMaxAge, getServerHost, getServerPort, onAfterProcessNotification, onBeforeProcessNotification, onExpiredNotification, onProduct, setProductStorage, setProductStorageMaxAge, setServerHost, setServerPortMethods inherited from class gov.usgs.earthquake.distribution.DefaultNotificationListener
cleanup, getCleanupInterval, getConcurrentProducts, getExcludePaths, getIncludePaths, getNotificationIndex, isProcessDuplicates, onBeforeProcessProduct, onNotification, setCleanupInterval, setConcurrentProducts, setNotificationIndex, setProcessDuplicatesMethods inherited from class gov.usgs.earthquake.product.AbstractListener
accept, getExcludeSources, getExcludeTypes, getIncludeSources, getIncludeTypes, getMaxTries, getRetryDelay, getTimeout, isIncludeActuals, isIncludeDevelopments, isIncludeInternals, isIncludeScenarios, isIncludeTests, setIncludeActuals, setIncludeDevelopments, setIncludeInternals, setIncludeScenarios, setIncludeTests, setMaxTries, setRetryDelay, setTimeoutMethods inherited from class gov.usgs.util.DefaultConfigurable
getName, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gov.usgs.util.Configurable
getName, setNameMethods inherited from interface gov.usgs.earthquake.distribution.NotificationListener
getMaxTries, getTimeout
-
Field Details
-
EIDS_POLLDIR_PROPERTY
Property referencing directory where notifications are "sent".- See Also:
-
EIDS_DEFAULT_POLLDIR
Default directory where notifications are sent.- See Also:
-
-
Constructor Details
-
EIDSNotificationSender
public EIDSNotificationSender()
-
-
Method Details
-
sendNotification
Description copied from class:DefaultNotificationSenderUtility method to do the actual notification sending. Should be overridden by subclasses.- Overrides:
sendNotificationin classDefaultNotificationSender- Parameters:
notification- The notification to send- Throws:
Exception- if something goes wrong
-
configure
Description copied from class:DefaultNotificationSenderConfigures based on configuration section.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classDefaultNotificationSender- Parameters:
config- The config- Throws:
Exception- if something goes wrong
-
shutdown
Description copied from class:DefaultNotificationSenderShut down storage- Specified by:
shutdownin interfaceConfigurable- Overrides:
shutdownin classDefaultNotificationSender- Throws:
Exception- if something goes wrong
-
startup
Description copied from class:DefaultNotificationSenderStart up storage- Specified by:
startupin interfaceConfigurable- Overrides:
startupin classDefaultNotificationSender- Throws:
Exception- if something goes wrong
-
getServerPolldir
- Returns:
- serverPolldir
-
setServerPolldir
- Parameters:
serverPolldir- file to set
-