|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--ts.biff.Controller
This class uses a FetchAgent e.g. a POP3 agent to repeatly scan a users mailbox for changes. When there is a change in the mailbox, this controller will notify any MailEvent listeners by firing a MailEvent.
Model| Field Summary | |
protected javax.swing.event.EventListenerList |
listenerList
A list holding MailListeners |
protected FetchAgent |
myAgent
The Fetch Agent used to scan mailbox messages |
protected java.util.Vector |
myMailFields
A vector holding mail fields of interest |
protected java.util.Vector |
myMailModels
A vector holding "raw" MailModel objects from last scan |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Controller(FetchAgent anAgent)
Instantiate the controller. |
|
| Method Summary | |
void |
addMailListener(MailListener aMailListener)
Adds a MailListener. |
protected void |
fireMailEvent(MailEvent m)
|
java.util.Vector |
getMail()
Returns a vector with mail messages from the last scan |
MailModel |
getMailModel(java.lang.String id)
Returns the MailModel with the submitted id |
protected void |
handleMessages(java.util.Vector v)
Fire a new MailEvent if and only if the new mail vector is different from the previous one. |
void |
removeMailListener(MailListener aMailListener)
Removes a MailListener |
void |
run()
Use the FetchAgent to scan for new Mail messages in a low priority Threaded loop |
void |
terminate()
Stop this thread |
void |
wakeUp()
Interrupt the sleep between each mail scan |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 |
protected FetchAgent myAgent
protected javax.swing.event.EventListenerList listenerList
protected java.util.Vector myMailFields
protected java.util.Vector myMailModels
| Constructor Detail |
public Controller(FetchAgent anAgent)
anAgent - A FetchAgent that is used to retrieve mail messages| Method Detail |
public void terminate()
public void run()
run in class java.lang.Threadpublic void wakeUp()
public java.util.Vector getMail()
public MailModel getMailModel(java.lang.String id)
id - a Mail message idpublic void addMailListener(MailListener aMailListener)
aMailListener - A mail listener objectpublic void removeMailListener(MailListener aMailListener)
aMailListener - An mail listener objectprotected void fireMailEvent(MailEvent m)
protected void handleMessages(java.util.Vector v)
v - a Vector with mail models from the latest scan
|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||