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.
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. |
EmailBundleSimpleton
public EmailBundleSimpleton()
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