|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.weft.alert.Watcher
uk.co.weft.alert.AbstractFileWatcher
An abstract superclass for FileWatcher, URLWatcher and similar.
| Nested Class Summary | |
protected class |
AbstractFileWatcher.FileValues
an object to pass the observed values of the file through the context |
| Field Summary | |
static java.lang.String |
FILETOKEN
A token on which we will seek the fully qualified pathname of the file to be watched in the config, and on which we will store that pathname in the alert-time context |
protected long |
lastModified
when it last changed |
protected long |
lastSize
how big it was |
static java.lang.String |
OBSERVEDVALUESTOKEN
a token on which we will store the observed values in the alert time context |
protected java.lang.String |
path
the path to the file I watch |
protected java.io.File |
watched
the file I watch |
static java.lang.String |
WHENCHANGEDTOKEN
a token on which we will store the time when change was noted in the alert time context |
| Fields inherited from class uk.co.weft.alert.Watcher |
alerter, alerts, configuration, debug, DEBUGTOKEN, ERRORTOKEN, INTERVALTOKEN, name, NAMETOKEN, recipient, resourceBundleName, sender, subject, SUBJECTTOKEN, template, TEMPLATETOKEN, thread, tooManyErrors, TOOMANYERRORS, whinges, winks |
| Constructor Summary | |
AbstractFileWatcher()
|
|
| Method Summary | |
void |
init(java.util.Map config)
initialise me with this configuration |
protected boolean |
mark(java.util.Map details)
mark the event indicated by details as having had it's alert sent |
protected java.lang.String |
maybeEscapePath(java.lang.String path)
Windows pathnames incude backslashes, which are treated by Java printing routines as introducing escape sequences. |
| Methods inherited from class uk.co.weft.alert.Watcher |
check, coerceToUrl, getAlerts, getArgs, getName, getNextCheck, getResource, getResourceString, getState, getStringWithDefault, getWhinges, grs, grs, maybeCheck, reset, resetWhinges, run, sendAlert, start, stop, usage, whinge |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String FILETOKEN
public static final java.lang.String WHENCHANGEDTOKEN
public static final java.lang.String OBSERVEDVALUESTOKEN
protected java.io.File watched
protected java.lang.String path
protected long lastModified
protected long lastSize
| Constructor Detail |
public AbstractFileWatcher()
| Method Detail |
public void init(java.util.Map config)
throws AlertingException
init in class WatcherAlertingException
protected boolean mark(java.util.Map details)
throws java.lang.Exception
mark in class Watcherdetails - details of the event seen
java.lang.Exceptionprotected java.lang.String maybeEscapePath(java.lang.String path)
|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||