|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
uk.org.iscream.cms.server.client.AlerterSkeleton
public abstract class AlerterSkeleton
Skeleton class for Alerters This skeleton reads alerts from the alert queue designated to the Alerter, it then feeds the alerts to the sendAlert method, which the extending class should implement. The class should then handle sending the message. This class also has a method to allow formatting of messages.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected ConfigurationProxy |
_cp
A reference to the singleton configuration proxy in use, through which alerter configuration can be obtained |
protected Logger |
_logger
This holds a reference to the system logger that is being used. |
protected String |
_name
This is the friendly identifier of the component this class is running in. |
protected int |
_qID
The ID of the queue the alerter will use. |
protected boolean |
_running
The state of the alerter thread |
String |
DEFAULT_LEVEL
The default level to send alerts at |
String |
NOT_CONFIGURED
If a configuration property is not configured, this will be used instead. |
String |
REVISION
The current CVS revision of this class |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AlerterSkeleton()
Constructs and starts the alerter reading alerts |
Method Summary | |
---|---|
abstract String |
getDescription()
Return the String representation of what the alerter does |
protected abstract String |
getFName()
Returns the "friendly" name of this class. |
protected Queue |
getQueue()
Gets hold of the Alerts queue from the AlerterManager. |
protected int |
getQueueId()
Gets an id to an individual queue |
protected String |
processAlertMessage(String message,
Alert alert)
Processes a message, replace key fields (eg. |
void |
run()
Reads the next alert from the alerter queue for this alerter. |
protected abstract void |
sendAlert(Alert alert)
Sends an alert object using whatever transport mechanism the extending class is implementing. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String REVISION
public final String DEFAULT_LEVEL
public final String NOT_CONFIGURED
protected String _name
protected Logger _logger
protected ConfigurationProxy _cp
protected int _qID
protected boolean _running
Constructor Detail |
---|
public AlerterSkeleton()
Method Detail |
---|
public void run()
run
in interface Runnable
run
in class Thread
protected abstract void sendAlert(Alert alert)
alert
- the Alert to sendprotected String processAlertMessage(String message, Alert alert)
message
- The message to processalert
- The Alert object to get data from
public abstract String getDescription()
getDescription
in interface PluginAlerter
protected Queue getQueue()
protected int getQueueId()
protected abstract String getFName()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |