com.isti.trinetwatch.emailer
Class Emailer

java.lang.Object
  extended by com.isti.trinetwatch.emailer.ConfigManager
      extended by com.isti.trinetwatch.emailer.Emailer
All Implemented Interfaces:
java.lang.Runnable

public class Emailer
extends ConfigManager
implements java.lang.Runnable

Class Emailer is a non-GUI client for SeisNetWatch that monitors an SNW server and sends status-alert email messages.


Field Summary
 
Fields inherited from class com.isti.trinetwatch.emailer.ConfigManager
alertIgnoreSubsetsProp, alertSelectSubsetsProp, alertShortMsgFlagProp, alertSubjectProp, alertSubsetLevelsFlagProp, alertSubsetLevelsProp, alertToAddressesProp, alertTriggerLevelsProp, alertTriggerSecsProp, cfgProps, consoleLogLevelProp, consoleMonitorProp, consoleRedirectFileNameProp, cycleTimeHoursProp, daemonModeProp, dontSendPartialFlagProp, emailFromAddressProp, emailToAddressesProp, GUIAcceptorRefFileProp, initSMTPTimeoutSecProp, logfileLogLevelProp, logFileNameProp, mailDebugFlagProp, mailPropsFileNameProp, maxCommLimitProp, maxConnAttemptsProp, noChangeReportFlagProp, noDetailReportFlagProp, reportAtLevelsProp, reportFromLevelsProp, reportIgnoreLevelsProp, reportsFileNameProp, reportSubjectProp, reportToLevelsProp, sendSMTPTimeoutSecProp, skipNoChgRepsFlagProp, smtpServerNameProp, updateSleepMSProp
 
Constructor Summary
Emailer(java.lang.String[] args, java.lang.String defConfigFnameStr)
          Creates an instance of the SNW Emailer object.
 
Method Summary
static boolean isEntryMatch(java.util.Vector vec, java.lang.String str)
          Determines if any part of the given string matches any entry in the given vector.
static void main(java.lang.String[] args)
          Program entry point.
 void run()
          Run the emailer.
protected  void setProperty(java.util.Properties props, java.lang.String key, java.lang.String value)
          Set the property.
protected  void setPropertySecondsToMs(java.util.Properties props, java.lang.String key, int seconds)
          Set the property.
protected  void terminateProgram(int exitCode)
          Terminate program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Emailer

public Emailer(java.lang.String[] args,
               java.lang.String defConfigFnameStr)
Creates an instance of the SNW Emailer object.

Parameters:
args - an array of command-line parameter strings.
defConfigFnameStr - the default configuration file name.
Method Detail

run

public void run()
Run the emailer.

Specified by:
run in interface java.lang.Runnable

setProperty

protected void setProperty(java.util.Properties props,
                           java.lang.String key,
                           java.lang.String value)
Set the property.

Parameters:
props - the properties.
key - the property key.
value - the property value.

setPropertySecondsToMs

protected void setPropertySecondsToMs(java.util.Properties props,
                                      java.lang.String key,
                                      int seconds)
Set the property.

Parameters:
props - the properties.
key - the property key.
seconds - the property seconds value.

terminateProgram

protected void terminateProgram(int exitCode)
Terminate program.

Parameters:
exitCode - exit code value to use.

isEntryMatch

public static boolean isEntryMatch(java.util.Vector vec,
                                   java.lang.String str)
Determines if any part of the given string matches any entry in the given vector.

Parameters:
vec - vector to use.
str - string to use.
Returns:
true if any part of the given string matches any entry in the given vector; false if not.

main

public static void main(java.lang.String[] args)
Program entry point.

Parameters:
args - array of command-line parameters.