public class OffLimitMailer extends Mailer
Mailer.GooglePropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private Map<String,Double> |
avalert
Average alerts.
|
private static String |
DEFAVERAGELIMITS
The list of column names to value-pairs denoting average limits.
|
private static String |
DEFAVORDER
Default order in the average output.
|
private static String |
DEFAVTELLIMITS |
private static boolean |
DEFDEBUG
The default debuggin mode.
|
private static String |
DEFDONELIST
The fields to query from the env table.
|
private static String |
DEFDONENAMES
How the returned columns are named.
|
private static String |
DEFDONEWHERE
Additional constraints for the done table query.
|
private static String |
DEFENVLIST
Properties for the offlimit alarm.
|
static String |
DEFFROM
The default from address.
|
private static String |
DEFJOINTLIST
The fields to query from the env table.
|
private static String |
DEFJOINTNAMES
How the returned columns are named.
|
private static String |
DEFJOINTWHERE
Additional constraints for the joint table query.
|
private static String |
DEFMINMAXORDER
Default order in the average output.
|
private static String |
DEFMINMAXTELS
The list of column names to value-pairs denoting min/max limits.
|
private static String |
DEFOBSLIST |
private static String |
DEFPASSWORD
Default password name.
|
private static String |
DEFSIGMALIMITS
The list of column names to single value denoting max deviations.
|
private static String |
DEFSIGMAORDER
Default order in the average output.
|
private static String |
DEFSMTPHOST
The default smtphost.
|
private static int |
DEFSMTPPORT
The default port.
|
private static String |
DEFTELESCOPE
The telescope query.
|
private static String |
DEFTO
The default to address.
|
private static String |
DEFUSERNAME
Default user name.
|
private static boolean |
DEFUSESSL
Default we use ssl.
|
private javax.mail.Address |
from
The from-address may not change.
|
static String |
KEY_AVERAGELIMITS
The list of column names to value-pairs denoting average limits.
|
static String |
KEY_AVORDER
How we order the list of average offenders in the mail.
|
static String |
KEY_AVTELLIMITS
The list of column names to value-pairs denoting average limits.
|
static String |
KEY_BCC
Address list of the recipients, bcc-type.
|
static String |
KEY_CC
Address list of the recipients, cc-type.
|
static String |
KEY_DEBUG
If true, mail-delivery is blocked for debugging mode.
|
static String |
KEY_FROM
Address of the sender, with or without domain.
|
static String |
KEY_MINMAXORDER
How we order the list of minmaxerage offenders in the mail.
|
static String |
KEY_MINMAXTELS
The list of column names to value-pairs denoting min/max limits.
|
static String |
KEY_SIGMALIMITS
The list of column names to single value denoting max deviations.
|
static String |
KEY_SIGMAORDER
How we order the list of average offenders in the mail.
|
static String |
KEY_SPANLIMITS
The list of column names to single value denoting max spans.
|
static String |
KEY_TO
Address list of the recipients, to-type.
|
private Map<String,Double> |
mmalert
Min/max alerts.
|
private Map<String,Double> |
sigalert
Sigma alerts.
|
KEY_PASSWORD, KEY_SMTPHOST, KEY_SMTPPORT, KEY_USERNAME, KEY_USESSL, STELLAMAINTENANCE, STELLAROBOTIC, STELLASUPPORT, SYSTEM_MAILDEBUGKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
OffLimitMailer(Map<String,String> prop)
Constructs a new mail-finalizer with the distinct properties.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
addToMapping(Map<String,Double> target,
String tel,
Map<String,Double> off)
We add a mapping for a specific telescope to the average offender mapping
by augmenting the search key by the telescope name as a colon-separated
pre-key.
|
boolean |
gather(Date now)
Gathers the db-data.
|
void |
init()
On init, we try to parse the from field.
|
static void |
main(String[] arg)
Does an alert report for the current day.
|
private boolean |
sendWarning(Date now)
Sends mail reports.
|
close, createStellaRoboticMailer, getAddresses, getStellaMaintenance, getStellaRobotic, getStellaSupport, prepareMail, prepareMail, sendMail, sendMail, sendMail, threadMailclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_FROM
public static final String KEY_TO
public static final String KEY_CC
public static final String KEY_BCC
public static final String KEY_DEBUG
public static final String KEY_AVORDER
public static final String KEY_MINMAXORDER
public static final String KEY_SIGMAORDER
public static final String KEY_AVTELLIMITS
public static final String KEY_AVERAGELIMITS
public static final String KEY_MINMAXTELS
public static final String KEY_SIGMALIMITS
public static final String KEY_SPANLIMITS
public static final String DEFFROM
private static final String DEFSMTPHOST
private static final int DEFSMTPPORT
private static final boolean DEFUSESSL
private static final String DEFUSERNAME
private static final String DEFPASSWORD
private static final String DEFTO
private static final boolean DEFDEBUG
private static final String DEFENVLIST
private static final String DEFOBSLIST
private static final String DEFDONELIST
private static final String DEFDONENAMES
private static final String DEFDONEWHERE
private static final String DEFJOINTLIST
private static final String DEFJOINTNAMES
private static final String DEFJOINTWHERE
private static final String DEFTELESCOPE
private static final String DEFAVERAGELIMITS
private static final String DEFAVTELLIMITS
private static final String DEFMINMAXTELS
private static final String DEFSIGMALIMITS
private static final String DEFAVORDER
private static final String DEFMINMAXORDER
private static final String DEFSIGMAORDER
private javax.mail.Address from
public OffLimitMailer(Map<String,String> prop)
#KEY_FOLLOWUP, the KEY_TO and the
Mailer.KEY_SMTPHOST are present. The latter key's value is directly
copied to the JavaMail required property mail.smtp.kost.
For efficiency, the mail session is initialized at finalizer construction, while the actual mail-transportation is done on error finalizing.
We use my properties to construct the Mailer instance to use.
public void init()
init in interface Initializableinit in class Mailerpublic boolean gather(Date now) throws InitException
InitExceptionprivate static final void addToMapping(Map<String,Double> target, String tel, Map<String,Double> off)
private boolean sendWarning(Date now) throws InitException
InitExceptionpublic static void main(String[] arg) throws InitException
InitException