|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--i3mclient.email.EmailReceive
This class worked for EmailReceiveManager. It starts a new own thread which received emails from one account in periodic time spans. These emails will be repacked for the EmailReceiveManager and send to it. The sleep time is devidet into two parts. 5 min means sleeping for 60x5sec., so the reaction time at closing of the class is only 5 sec. and not 5 min.
EmailReceiveManager| Field Summary | |
static String |
PROVIDER_IMAP
|
static String |
PROVIDER_POP3
|
| Constructor Summary | |
EmailReceive(String setHost,
int setPort,
String setUser,
String setPasswd,
String setProvider,
Date setTime)
Constructor. |
|
| Method Summary | |
void |
addEmailNotificationListener(EmailListener listener)
Adds a new listener for new email receive into a internal list. |
void |
addErrorListener(ErrorListener listener)
Adds a new listener for any kind of errors into a internal list. |
Date |
getTime()
Returns the date of the youngest eMail |
void |
removeEmailNotificationListener(EmailListener listener)
Remove a new listener for new email receive into a internal list. |
void |
removeErrorListener(ErrorListener listener)
Remove a new listener for any kind of errors from a internal list. |
void |
run()
|
void |
start()
Start the thread. |
void |
stop()
Stop the thread by event flag. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PROVIDER_POP3
public static final String PROVIDER_IMAP
| Constructor Detail |
public EmailReceive(String setHost,
int setPort,
String setUser,
String setPasswd,
String setProvider,
Date setTime)
setHost - The email serversetPort - The port of the email serversetUser - The name of the usersetPasswd - The password of the usersetProvider - The provider (pop3 or imap)setTime - The time of last email receiving| Method Detail |
public Date getTime()
public void start()
public void stop()
public void run()
run in interface Runnablepublic void addEmailNotificationListener(EmailListener listener)
listener - The listener which will be informed about new mailspublic void addErrorListener(ErrorListener listener)
listener - The listener which will be informed about errorspublic void removeEmailNotificationListener(EmailListener listener)
listener - The listener which will be no longer informed about new mailspublic void removeErrorListener(ErrorListener listener)
listener - The listener which will be no longer informed about errors
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||