Package gov.usgs.earthquake.eids
Class EIDSInputWedge
java.lang.Object
gov.usgs.util.DefaultConfigurable
gov.usgs.earthquake.distribution.ProductBuilder
gov.usgs.earthquake.eids.EIDSInputWedge
- All Implemented Interfaces:
Bootstrappable
,Configurable
,Runnable
Deprecated.
Read messages from files or a poll directory, and push products into PDL.
This is supports EIDS/QDDS style polling. The input messages are converted to
Quakeml using the FileToQuakemlConverter interface, then sent as Quakeml
based products.
Much of the configuration can be supplied using either a configuration file,
or command line arguments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String[]
Deprecated.Global reference to arguments array, when EIDSInputWedge is run via Bootstrap.static final String
Deprecated.Argument for attachstatic final String
Deprecated.Argument for binaryFormatstatic final String
Deprecated.Argument for connection timeoutstatic final String
Deprecated.Argument for creating internal productsstatic final String
Deprecated.Whether created products should be converted to internal types.static final String
Deprecated.Argument for creating scenario productsstatic final String
Deprecated.Whether created products should be converted to scenario types.static final Integer
Deprecated.Default timeout for connectionstatic final String
Deprecated.Default status of CREATE_INTERNAL_PRODUCTSstatic final String
Deprecated.Default status of CREATE_SCENARIO_PRODUCTSstatic final String
Deprecated.Default status of DO_BUFFER_FIX propertystatic final String
Deprecated.Default error directorystatic final String
Deprecated.Default parser classstatic final String
Deprecated.Default status of POLL_CAREFULLYstatic final String
Deprecated.Default polldirstatic final String
Deprecated.Default interval for POLLINTERVALstatic final String
Deprecated.Default status of sendMechanism...static final String
Deprecated.Default status of sendOrigin...static final String
Deprecated.Default storage directorystatic final String
Deprecated.Default status of validatestatic final String
Deprecated.Argument for disableDeflatestatic final String
Deprecated.Property for doBufferFixstatic final String
Deprecated.Argument for errordirstatic final String
Deprecated.Property for error directorystatic final String
Deprecated.Argument for filestatic final String
Deprecated.Argument for helpstatic final String
Deprecated.Argument for parserstatic final String
Deprecated.Property for parser classstatic final String
Deprecated.Argument for pollstatic final String
Deprecated.Argument for poleCarefullystatic final String
Deprecated.Property for pollCarefullystatic final String
Deprecated.Argument for poll intervalstatic final String
Deprecated.Argument for polldirstatic final String
Deprecated.Property for polldirstatic final String
Deprecated.Poll interval propertystatic final String
Deprecated.Argument for privateKeystatic final String
Deprecated.Property for sendMechanismWhenPhasesExiststatic final String
Deprecated.Argument for sending mechanisms with phasesstatic final String
Deprecated.Property for sendOriginWhenPhasesExiststatic final String
Deprecated.Argument for sending origin with phasesstatic final String
Deprecated.Argument for serversstatic final String
Deprecated.Default server for server argumentstatic final String
Deprecated.Argument for signatureVersionstatic final String
Deprecated.Argument for storagedirstatic final String
Deprecated.Property for storage directorystatic final String
Deprecated.Argument for testingstatic final String
Deprecated.Argument for validatestatic final String
Deprecated.Property for validateFields inherited from class gov.usgs.earthquake.distribution.ProductBuilder
DEFAULT_PARALLEL_SEND, DEFAULT_PARALLEL_SEND_TIMEOUT, PARALLEL_SEND_PROPERTY, PARALLEL_SEND_TIMEOUT_PROPERTY, parallelSend, parallelSendTimeout, PRIVATE_KEY_FILE_PROPERTY, SENDERS_PROPERTY, SIGNATURE_VERSION_PROPERTY
Fields inherited from interface gov.usgs.earthquake.distribution.Bootstrappable
RUN_EXCEPTION_EXIT_CODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Process configuration settings.Deprecated.Deprecated.Deprecated.long
Deprecated.Deprecated.Deprecated.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.void
Deprecated.Parses given file, looking for send exceptions and reports statisticsparseAndSend
(File file, Map<String, Content> attachContent) Deprecated.Gets products from file and iterates through each product During iteration, sets type to internal/scenario if createInternalProducts or createScenarioProducts is true.static List<ProductSender>
parseServers
(String servers, Integer connectTimeout, boolean binaryFormat, boolean enableDeflate) Deprecated.Parses a string of servers into SocketProductSenders, all put into a list of product sendersstatic void
Deprecated.Usage for interfacevoid
run()
Deprecated.void
Deprecated.Bootstrappable interface.void
setCreateInternalProducts
(boolean createInternalProducts) Deprecated.void
setCreateScenarioProducts
(boolean createScenarioProducts) Deprecated.void
setDirectoryPoller
(Poller directoryPoller) Deprecated.void
setErrordir
(File errordir) Deprecated.void
setPollCarefully
(boolean pollCarefully) Deprecated.void
setPolldir
(File polldir) Deprecated.void
setPollInterval
(long pollInterval) Deprecated.void
setProductCreator
(ProductCreator productCreator) Deprecated.void
setStoragedir
(File storagedir) Deprecated.void
shutdown()
Deprecated.Stop any processing/background threads.void
startup()
Deprecated.Start any processing/background threads.Methods inherited from class gov.usgs.earthquake.distribution.ProductBuilder
addProductSender, getPrivateKey, getProductSenders, getSignatureVersion, parallelSendProduct, removeProductSender, sendProduct, setPrivateKey, setSignatureVersion
Methods inherited from class gov.usgs.util.DefaultConfigurable
getName, setName
-
Field Details
-
ARGS
Deprecated.Global reference to arguments array, when EIDSInputWedge is run via Bootstrap. -
PARSER_CLASS_PROPERTY
Deprecated.Property for parser class- See Also:
-
DEFAULT_PARSER_CLASS
Deprecated.Default parser class- See Also:
-
POLLDIR_PROPERTY
Deprecated.Property for polldir- See Also:
-
DEFAULT_POLLDIR
Deprecated.Default polldir- See Also:
-
STORAGEDIR_PROPERTY
Deprecated.Property for storage directory- See Also:
-
DEFAULT_STORAGEDIR
Deprecated.Default storage directory- See Also:
-
ERRORDIR_PROPERTY
Deprecated.Property for error directory- See Also:
-
DEFAULT_ERRORDIR
Deprecated.Default error directory- See Also:
-
VALIDATE_PROPERTY
Deprecated.Property for validate- See Also:
-
DEFAULT_VALIDATE
Deprecated.Default status of validate- See Also:
-
SEND_ORIGIN_WHEN_PHASES_EXIST_PROPERTY
Deprecated.Property for sendOriginWhenPhasesExist- See Also:
-
DEFAULT_SEND_ORIGIN_WHEN_PHASES_EXIST
Deprecated.Default status of sendOrigin...- See Also:
-
SEND_MECHANISM_WHEN_PHASES_EXIST_PROPERTY
Deprecated.Property for sendMechanismWhenPhasesExist- See Also:
-
DEFAULT_SEND_MECHANISM_WHEN_PHASES_EXIST
Deprecated.Default status of sendMechanism...- See Also:
-
CREATE_INTERNAL_PRODUCTS_PROPERTY
Deprecated.Whether created products should be converted to internal types.- See Also:
-
DEFAULT_CREATE_INTERNAL_PRODUCTS
Deprecated.Default status of CREATE_INTERNAL_PRODUCTS- See Also:
-
CREATE_SCENARIO_PRODUCTS_PROPERTY
Deprecated.Whether created products should be converted to scenario types.- See Also:
-
DEFAULT_CREATE_SCENARIO_PRODUCTS
Deprecated.Default status of CREATE_SCENARIO_PRODUCTS- See Also:
-
POLLINTERVAL_PROPERTY
Deprecated.Poll interval property- See Also:
-
DEFAULT_POLLINTERVAL
Deprecated.Default interval for POLLINTERVAL- See Also:
-
POLL_CAREFULLY_PROPERTY
Deprecated.Property for pollCarefully- See Also:
-
DEFAULT_POLL_CAREFULLY
Deprecated.Default status of POLL_CAREFULLY- See Also:
-
DO_BUFFER_FIX_PROPERTY
Deprecated.Property for doBufferFix- See Also:
-
DEFAULT_DO_BUFFER_FIX
Deprecated.Default status of DO_BUFFER_FIX property- See Also:
-
HELP_ARGUMENT
Deprecated.Argument for help- See Also:
-
POLL_ARGUMENT
Deprecated.Argument for poll- See Also:
-
POLL_CAREFULLY_ARGUMENT
Deprecated.Argument for poleCarefully- See Also:
-
POLLDIR_ARGUMENT
Deprecated.Argument for polldir- See Also:
-
ERRORDIR_ARGUMENT
Deprecated.Argument for errordir- See Also:
-
STORAGEDIR_ARGUMENT
Deprecated.Argument for storagedir- See Also:
-
POLL_INTERVAL_ARGUMENT
Deprecated.Argument for poll interval- See Also:
-
FILE_ARGUMENT
Deprecated.Argument for file- See Also:
-
PARSER_ARGUMENT
Deprecated.Argument for parser- See Also:
-
VALIDATE_ARGUMENT
Deprecated.Argument for validate- See Also:
-
PRIVATE_KEY_ARGUMENT
Deprecated.Argument for privateKey- See Also:
-
SIGNATURE_VERSION_ARGUMENT
Deprecated.Argument for signatureVersion- See Also:
-
SERVERS_ARGUMENT
Deprecated.Argument for servers- See Also:
-
SERVERS_DEFAULT
Deprecated.Default server for server argument- See Also:
-
CONNECT_TIMEOUT_ARGUMENT
Deprecated.Argument for connection timeout- See Also:
-
DEFAULT_CONNECT_TIMEOUT
Deprecated.Default timeout for connection -
BINARY_FORMAT_ARGUMENT
Deprecated.Argument for binaryFormat- See Also:
-
DISABLE_DEFLATE_ARGUMENT
Deprecated.Argument for disableDeflate- See Also:
-
ATTACH_ARGUMENT
Deprecated.Argument for attach- See Also:
-
SEND_ORIGINS_WITH_PHASES
Deprecated.Argument for sending origin with phases- See Also:
-
SEND_MECHANISMS_WITH_PHASES
Deprecated.Argument for sending mechanisms with phases- See Also:
-
CREATE_INTERNAL_PRODUCTS
Deprecated.Argument for creating internal products- See Also:
-
CREATE_SCENARIO_PRODUCTS
Deprecated.Argument for creating scenario products- See Also:
-
TEST_ARGUMENT
Deprecated.Argument for testing- See Also:
-
-
Constructor Details
-
EIDSInputWedge
Deprecated.Empty constructor- Throws:
Exception
- if error occurs
-
-
Method Details
-
parseAndSend
public Map<ProductId,Map<ProductSender, parseAndSendException>> (File file, Map<String, Content> attachContent) throws ExceptionDeprecated.Gets products from file and iterates through each product During iteration, sets type to internal/scenario if createInternalProducts or createScenarioProducts is true. Attaches Content files to product, Sends product- Parameters:
file
- File containing productsattachContent
- Map of String and Content- Returns:
- Map of product IDs and sent products
- Throws:
Exception
- if error occurs
-
onFile
Deprecated.Parses given file, looking for send exceptions and reports statistics- Parameters:
file
- to parse and look for errors
-
configure
Deprecated.Description copied from class:DefaultConfigurable
Process configuration settings. Called before startup().- Specified by:
configure
in interfaceConfigurable
- Overrides:
configure
in classProductBuilder
- Parameters:
config
- the Config object with settings.- Throws:
Exception
- if configuration exceptions occur.
-
shutdown
Deprecated.Description copied from class:DefaultConfigurable
Stop any processing/background threads.- Specified by:
shutdown
in interfaceConfigurable
- Overrides:
shutdown
in classProductBuilder
- Throws:
Exception
- if exceptions occur while starting.
-
startup
Deprecated.Description copied from class:DefaultConfigurable
Start any processing/background threads.- Specified by:
startup
in interfaceConfigurable
- Overrides:
startup
in classProductBuilder
- Throws:
Exception
- if exceptions occur while starting.
-
getPolldir
Deprecated.- Returns:
- polldir
-
setPolldir
Deprecated.- Parameters:
polldir
- File to set
-
getStoragedir
Deprecated.- Returns:
- storagedir
-
setStoragedir
Deprecated.- Parameters:
storagedir
- File to set
-
getErrordir
Deprecated.- Returns:
- errordir
-
setErrordir
Deprecated.- Parameters:
errordir
- File to send
-
getProductCreator
Deprecated.- Returns:
- productCreator
-
setProductCreator
Deprecated.- Parameters:
productCreator
- to set
-
getDirectoryPoller
Deprecated.- Returns:
- directoryPoller
-
setDirectoryPoller
Deprecated.- Parameters:
directoryPoller
- to set
-
getPollInterval
public long getPollInterval()Deprecated.- Returns:
- pollInterval long
-
setPollInterval
public void setPollInterval(long pollInterval) Deprecated.- Parameters:
pollInterval
- long to set
-
isPollCarefully
public boolean isPollCarefully()Deprecated.- Returns:
- pollCarefully boolean
-
setPollCarefully
public void setPollCarefully(boolean pollCarefully) Deprecated.- Parameters:
pollCarefully
- boolean to set
-
isCreateInternalProducts
public boolean isCreateInternalProducts()Deprecated.- Returns:
- the createInternalProducts
-
setCreateInternalProducts
public void setCreateInternalProducts(boolean createInternalProducts) Deprecated.- Parameters:
createInternalProducts
- the createInternalProducts to set
-
isCreateScenarioProducts
public boolean isCreateScenarioProducts()Deprecated.- Returns:
- the createScenarioProducts
-
setCreateScenarioProducts
public void setCreateScenarioProducts(boolean createScenarioProducts) Deprecated.- Parameters:
createScenarioProducts
- the createScenarioProducts to set
-
parseServers
public static List<ProductSender> parseServers(String servers, Integer connectTimeout, boolean binaryFormat, boolean enableDeflate) Deprecated.Parses a string of servers into SocketProductSenders, all put into a list of product senders- Parameters:
servers
- String of servers, split by commasconnectTimeout
- int timeoutbinaryFormat
- boolean if binary formatenableDeflate
- boolean if Deflate should be enabled- Returns:
- List of product senders
-
run
Deprecated.Bootstrappable interface.- Specified by:
run
in interfaceBootstrappable
- Parameters:
args
- array of command line arguments.- Throws:
Exception
- Exception
-
printUsage
public static void printUsage()Deprecated.Usage for interface -
run
public void run()Deprecated.
-