com.aurel.track.dbase
Class EmailTickler

java.lang.Object
  extended by java.lang.Thread
      extended by com.aurel.track.dbase.EmailTickler
All Implemented Interfaces:
java.lang.Runnable

public class EmailTickler
extends java.lang.Thread

This class runs as separate thread and sends reminder emails to those people that like them for tasks that are about to be due or are overdue.

Version:
$Revision: 1.8 $
Author:
Joerg Friedrich

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EmailTickler()
           
EmailTickler(int noOfTimesPerDay)
           
 
Method Summary
protected  void initTickler(int noOfTimesPerDay)
           
 void run()
           
 void stopTickler()
           
 void tickle()
          Here is where we do all the work for tickling.
 
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
 

Constructor Detail

EmailTickler

public EmailTickler()

EmailTickler

public EmailTickler(int noOfTimesPerDay)
Method Detail

initTickler

protected void initTickler(int noOfTimesPerDay)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopTickler

public void stopTickler()

tickle

public void tickle()
Here is where we do all the work for tickling. This routine will be called x times per day, x being the number used in the constructor. Execution times are usually whole hours; this routine will never be called more than once an hour (24 times a day). Algorithm: For each user that likes to be tickled, and whose last email was being sent before today minus week/frequency configured by this user, search all issues where she is either originator, manager, or responsible, depending on her settings in her profile, and which have an entry in either the start date or the due date. Compare these dates with the current date. If the difference is less or equal the lead (buffer) she has configured for herself, collect this issue. Once through, mail her the collection, if it is not empty.



Issue Tracking with Track+: Home Page      Copyright © 2008 Trackplus. All Rights Reserved.