org.datamanager.simpleton
Class EmailBundleSimpleton

java.lang.Object
  |
  +--org.datamanager.kernel.Simpleton
        |
        +--org.datamanager.simpleton.EmailBundleSimpleton
All Implemented Interfaces:
EventHandler

public class EmailBundleSimpleton
extends Simpleton
implements EventHandler

Starts the email application with all the required simpletons in the order required. Each successive simpleton is only loaded after the first one has subscribed to the Pool. Contains two static arrays: DEPENDENT_SIMPLETONS and INDEPENDENT_SIMPLETONS. The former are Simpletons that subscribe to the pool. We wait until each has subscribed until we launch the next. Independent Simpletons do not subscribed to the pool. We launch them after all the others. FIXME: This causes compile time dependencies but we are cool with that for the time being.


Nested Class Summary
 
Nested classes inherited from class org.datamanager.kernel.Simpleton
Simpleton.Information, Simpleton.Priority
 
Constructor Summary
EmailBundleSimpleton()
           
 
Method Summary
 void handle(DataManagerEvent event)
          Handles the SubscribeEventGeneratorEvent.
 void process()
          Subscribes to the pool to hear SubscribeEventGeneratorEventS and starts the first of the simpletons.
 
Methods inherited from class org.datamanager.kernel.Simpleton
clone, getInformation, getPriority, setInformation, setPriority, start
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmailBundleSimpleton

public EmailBundleSimpleton()
Method Detail

process

public void process()
Subscribes to the pool to hear SubscribeEventGeneratorEventS and starts the first of the simpletons.

Specified by:
process in class Simpleton

handle

public void handle(DataManagerEvent event)
Handles the SubscribeEventGeneratorEvent. If the event has been caused by the expected simpleton, start the next one.

Specified by:
handle in interface EventHandler
Parameters:
event - The event to handle.


See the Helium Website