External Notification Listener
The external notification listener provides a method for configuring external processes to be triggered via command-line invocation when products are received. In addition to the standard listener properties, this type of listener accepts the following specific properties:
- command
- The executable command to be invoked when a product is to be processed.
- storage
- Name of a separate configuration sub-section defining the storage to be used by the external listener.
- One of
storage
orstorageDirectory
must be specified. It is a configuration to provide both. - storageDirectory
- Directory to use for creating a default
FileProductStorage
for use with this external listener. - One of
storage
orstorageDirectory
must be specified. It is a configuration to provide both.
Example configuration
Note: Dependent configuration sub-sections not shown in this configuration example.
1
2
3
4
5
6
7
listeners = external_listener
[external_listener]
type = gov.usgs.earthquake.distribution.ExternalNotificationListener
command = /some/path/script.sh
listenerIndexFile = external_listener_index.db
storage = listener_listener_storage
External Command Line Options
The external command will be invoked with the following command line options when a product is to be processed. The command should be able to parse any/all of these options as necessary to process the product.
--directory=[/path/to/file]
- An absolute path to where product data is stored related to this notification.
--type=[type]
- The type of product associated with this notification.
--code=[code]
- The product code, without source network, for the product associated with this notification.
--source=[source]
- The source network for the product associated with this notification.
--updateTime=[time]
- The update time of the product associated with this notification in ISO 8601 date format. (e.g., 2000-01-01T00:00:00Z)
--status=[status]
- The status of the product related to this notification. It can be any of
the following:
UPDATE
: The product has been created or updates an existing product.DELETE
: The product has been marked to be deleted.
--delete
- (Optional) This argument will appear only when the value of the
--status
argument is “DELETE”. "--property-[name]=[value]"
- (Optional) A series of these arguments will be appended, one for each defined property in the summary of this product.
"--link-[relation]=[value]"
- (Optional) A series of these arguments will be appended, one for each defined link in the summary of this product.
--content
- (Optional) Indicates that non-file content will be sent to the command over its stdin.
--contentType=[type]
- (Optional) Indicates the MIME type of the content that will be sent over stdin. Will always appear when the –content argument appears.
--signature=[signature]
- (Optional) The signature key of the product creator, if it was provided.
Last modified: Fri Jul 26 00:56:16 UTC 2024