i3mclient.email
Class EmailReceiveManager

java.lang.Object
  |
  +--i3mclient.email.EmailReceiveManager
All Implemented Interfaces:
EmailListener, ErrorListener

public class EmailReceiveManager
extends Object
implements EmailListener, ErrorListener

This call managed all email accounts and redirected all emails to the EmailGUI. Errormessages are packed in a email also.

Author:
Gunther Wuerz
See Also:
EmailGUI

Constructor Summary
EmailReceiveManager(EMailAccountData[] setEmad)
          Constructor.
 
Method Summary
 void addEmailNotificationListener(EmailListener listener)
          Adds a new listener for new email receive into a internal list.
 void errorMessage(String message)
          Call it, to bring up a message box.
 void gotNewMails(Email[] messages)
          Called if new emails are received.
 void loginError()
          Called, when a login error (no session) occured.
 void removeEmailNotificationListener(EmailListener listener)
          Remove a listener for new email receive from a internal list.
 void start()
          Start the thread from all created accounts.
 void stop()
          Stop the threads from all created accounts and rescue the date of youngest mails.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailReceiveManager

public EmailReceiveManager(EMailAccountData[] setEmad)
Constructor.

Parameters:
setEmad - The email-account the user will be notified
Method Detail

start

public void start()
Start the thread from all created accounts.


stop

public void stop()
Stop the threads from all created accounts and rescue the date of youngest mails.


addEmailNotificationListener

public void addEmailNotificationListener(EmailListener listener)
Adds a new listener for new email receive into a internal list.

Parameters:
listener - The listener which will be informed about new emails

removeEmailNotificationListener

public void removeEmailNotificationListener(EmailListener listener)
Remove a listener for new email receive from a internal list.

Parameters:
listener - The listener which will be no linger informed about new emails

gotNewMails

public void gotNewMails(Email[] messages)
Description copied from interface: EmailListener
Called if new emails are received.

Specified by:
gotNewMails in interface EmailListener
Parameters:
messages - The new emails

loginError

public void loginError()
Description copied from interface: ErrorListener
Called, when a login error (no session) occured.

Specified by:
loginError in interface ErrorListener

errorMessage

public void errorMessage(String message)
Description copied from interface: ErrorListener
Call it, to bring up a message box.

Specified by:
errorMessage in interface ErrorListener
Parameters:
message - The message which should apear in the message box.