org.datamanager.simpleton
Class EmailRetrieverSimpleton
java.lang.Object
|
+--org.datamanager.kernel.Simpleton
|
+--org.datamanager.simpleton.EmailRetrieverSimpleton
- All Implemented Interfaces:
- EventHandler
- public class EmailRetrieverSimpleton
- extends Simpleton
- implements EventHandler
Retrieves some email from an IMAP server and creates corresponding Entities
for that email in the Pool. When this Simpleton is started, it fires an
EmailParametersRequestEvent into the Pool. Any interested handler of this
request event responds by firing an EmailParametersEnteredCollectorEvent
containing the various Email Configuration parameters needed to connect to
the email data store (username, password, host machine, mailbox name).
These parameters are encapsulated by an EmailParametersEntityValue.
FIXME:
1. document the structure of the created Entities.
2. Refactor this class. My god. Talk about monolithic pieces of
ever-burgeoning panty-waist-line mungballs functionality.
3. Fix bug with re-retrieval of email downloading triplicate copies.
Method Summary |
void |
handle(DataManagerEvent event)
Handle a DataManagerEvent that has been fired. |
void |
process()
Performs the work of this Simpleton. |
EmailRetrieverSimpleton
public EmailRetrieverSimpleton()
process
public void process()
- Description copied from class:
Simpleton
- Performs the work of this Simpleton. Simpleton
implementation must override this class.
- Specified by:
process
in class Simpleton
handle
public void handle(DataManagerEvent event)
- Description copied from interface:
EventHandler
- Handle a DataManagerEvent that has been fired.
- Specified by:
handle
in interface EventHandler
- Parameters:
event
- The event to handle.
See the Helium Website