Package gov.usgs.earthquake.distribution
Class ProductKey
java.lang.Object
gov.usgs.util.DefaultConfigurable
gov.usgs.earthquake.distribution.ProductKey
- All Implemented Interfaces:
Configurable
This represents a public key used to verify product signatures.
A key should have at least one source and/or one type.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for the Configurable interface.Construct a new ProductPublicKey. -
Method Summary
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Field Details
-
LOGGER
Logger for use in file -
SOURCES_PROPERTY_NAME
Property name for sources.- See Also:
-
TYPES_PROPERTY_NAME
Property name for types.- See Also:
-
KEY_PROPERTY_NAME
Property name for key.- See Also:
-
-
Constructor Details
-
ProductKey
public ProductKey()Empty constructor for the Configurable interface. -
ProductKey
Construct a new ProductPublicKey. Sources- Parameters:
key- the public key.sources- the sources to use with this key.types- the types to use with this key.
-
-
Method Details
-
isForProduct
Check whether this key is a candidate for verifying a signature. If any sources, product source must be in list. If any types, product type must be in list.- Parameters:
id- which product to check.- Returns:
- true if this key might verify the signature for given product.
-
configure
Description copied from class:DefaultConfigurableProcess configuration settings. Called before startup().- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classDefaultConfigurable- Parameters:
config- the Config object with settings.- Throws:
Exception- if configuration exceptions occur.
-
shutdown
Description copied from class:DefaultConfigurableStop any processing/background threads.- Specified by:
shutdownin interfaceConfigurable- Overrides:
shutdownin classDefaultConfigurable- Throws:
Exception- if exceptions occur while starting.
-
startup
Description copied from class:DefaultConfigurableStart any processing/background threads.- Specified by:
startupin interfaceConfigurable- Overrides:
startupin classDefaultConfigurable- Throws:
Exception- if exceptions occur while starting.
-
getKey
- Returns:
- the key
-
setKey
- Parameters:
key- the key to set
-
getSources
- Returns:
- the sources
-
getTypes
- Returns:
- the types
-