Package edu.sc.seis.sod
Class Start
java.lang.Object
edu.sc.seis.sod.Start
public class Start
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Start.InputSourceCreator
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DBURL_KEY
static java.lang.String
DEFAULT_PARSER
static java.lang.String
DEFAULT_PROPS
protected java.lang.String
HSQL_FILE_URL
protected static NetworkArm
network
static boolean
RUN_ARMS
static java.lang.String
TUTORIAL_LOC
-
Constructor Summary
Constructors Constructor Description Start(Args args)
Creates a newStart
instance set to use the XML config file in confFilenameStart(Args args, Start.InputSourceCreator sourceMaker, java.util.Properties props, boolean commandLineToolRun)
-
Method Summary
Modifier and Type Method Description static void
add(ArmListener listener)
static void
add(java.util.Properties newProps)
static void
addResultMailer(java.util.Properties mailProps)
void
allHopeAbandon(java.lang.String message)
static void
armFailure(Arm arm, java.lang.Throwable t)
static void
cataclysmicFailureOfUnbelievableProportions()
static void
checkGCJ()
static org.w3c.dom.Document
createDoc(org.xml.sax.InputSource source, java.lang.String filename)
static org.xml.sax.InputSource
createInputSource(java.lang.ClassLoader cl, java.lang.String loc)
static java.io.InputStream
createInputStream(java.lang.ClassLoader cl, java.lang.String loc)
static java.io.InputStream
createInputStream(java.lang.String loc)
static RetryStrategy
createRetryStrategy(int numRetries)
static void
exit(java.lang.String reason)
static Args
getArgs()
static org.w3c.dom.Element
getConfig()
static java.lang.String
getConfigFileName()
static java.time.Duration
getElapsedTime()
static EventArm
getEventArm()
static NetworkArm
getNetworkArm()
static edu.sc.seis.sod.util.exceptionHandler.ResultMailer
getResultMailer()
static RunProperties
getRunProps()
static java.time.Instant
getStartTime()
static WaveformArm[]
getWaveformArmArray()
static WaveformArm[]
getWaveformArms()
Deprecated.static AbstractWaveformRecipe
getWaveformRecipe()
static void
informUserOfBadNetworkAndExit(java.lang.String networkCode, NetworkNotFound nnf)
static void
informUserOfBadQueryAndExit(java.lang.String message, java.lang.Exception e)
protected void
initDatabase()
static boolean
isAnyWaveformArmActive()
static boolean
isArmFailure()
static void
loadProps(java.io.InputStream propStream, java.util.Properties baseProps)
static void
main(java.lang.String[] args)
static void
setCommandName(java.lang.String name)
static void
setConfig(org.w3c.dom.Element config)
void
setupDatabaseForUnitTests()
static void
simpleArmFailure(Arm arm, java.lang.String reason)
void
start()
static void
wakeUpAllArms()
protected void
warnIfDatabaseExists()
-
Field Details
-
HSQL_FILE_URL
protected java.lang.String HSQL_FILE_URL -
DEFAULT_PARSER
public static final java.lang.String DEFAULT_PARSER- See Also:
- Constant Field Values
-
network
-
DBURL_KEY
public static final java.lang.String DBURL_KEY- See Also:
- Constant Field Values
-
RUN_ARMS
public static boolean RUN_ARMS -
TUTORIAL_LOC
public static final java.lang.String TUTORIAL_LOC- See Also:
- Constant Field Values
-
DEFAULT_PROPS
public static final java.lang.String DEFAULT_PROPS- See Also:
- Constant Field Values
-
-
Constructor Details
-
Start
Creates a newStart
instance set to use the XML config file in confFilename- Throws:
java.lang.Exception
-
Start
public Start(Args args, Start.InputSourceCreator sourceMaker, java.util.Properties props, boolean commandLineToolRun) throws java.lang.Exception- Throws:
java.lang.Exception
-
-
Method Details
-
informUserOfBadNetworkAndExit
public static void informUserOfBadNetworkAndExit(java.lang.String networkCode, NetworkNotFound nnf) -
informUserOfBadQueryAndExit
public static void informUserOfBadQueryAndExit(java.lang.String message, java.lang.Exception e) -
getStartTime
public static java.time.Instant getStartTime() -
getElapsedTime
public static java.time.Duration getElapsedTime() -
getConfigFileName
public static java.lang.String getConfigFileName() -
setupDatabaseForUnitTests
- Throws:
ConfigurationException
-
initDatabase
- Throws:
ConfigurationException
-
warnIfDatabaseExists
protected void warnIfDatabaseExists() -
loadProps
public static void loadProps(java.io.InputStream propStream, java.util.Properties baseProps) throws java.io.IOException- Throws:
java.io.IOException
-
createInputSource
public static org.xml.sax.InputSource createInputSource(java.lang.ClassLoader cl, java.lang.String loc) throws java.io.IOException- Throws:
java.io.IOException
-
createInputStream
public static java.io.InputStream createInputStream(java.lang.String loc) throws java.io.IOException, java.net.MalformedURLException, java.io.FileNotFoundException- Throws:
java.io.IOException
java.net.MalformedURLException
java.io.FileNotFoundException
-
createInputStream
public static java.io.InputStream createInputStream(java.lang.ClassLoader cl, java.lang.String loc) throws java.io.IOException, java.net.MalformedURLException, java.io.FileNotFoundException- Throws:
java.io.IOException
java.net.MalformedURLException
java.io.FileNotFoundException
-
createRetryStrategy
-
setCommandName
public static void setCommandName(java.lang.String name) -
setConfig
public static void setConfig(org.w3c.dom.Element config) -
getWaveformRecipe
-
getEventArm
-
getNetworkArm
-
getWaveformArms
Deprecated. -
getWaveformArmArray
-
getRunProps
-
createDoc
public static org.w3c.dom.Document createDoc(org.xml.sax.InputSource source, java.lang.String filename) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException- Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
-
getResultMailer
public static edu.sc.seis.sod.util.exceptionHandler.ResultMailer getResultMailer() throws ConfigurationException- Throws:
ConfigurationException
-
addResultMailer
public static void addResultMailer(java.util.Properties mailProps) throws edu.sc.seis.sod.util.exceptionHandler.MissingPropertyException- Throws:
edu.sc.seis.sod.util.exceptionHandler.MissingPropertyException
-
start
public void start() throws java.lang.Exception- Throws:
java.lang.Exception
-
allHopeAbandon
public void allHopeAbandon(java.lang.String message) -
add
-
getArgs
-
getConfig
public static org.w3c.dom.Element getConfig() -
checkGCJ
public static void checkGCJ() -
main
public static void main(java.lang.String[] args) -
exit
public static void exit(java.lang.String reason) -
add
public static void add(java.util.Properties newProps) -
cataclysmicFailureOfUnbelievableProportions
public static void cataclysmicFailureOfUnbelievableProportions() -
simpleArmFailure
-
armFailure
-
wakeUpAllArms
public static void wakeUpAllArms() -
isAnyWaveformArmActive
public static boolean isAnyWaveformArmActive() -
isArmFailure
public static boolean isArmFailure()
-