rss.controller
Class Controller

java.lang.Object
  extended by rss.controller.Controller
All Implemented Interfaces:
DataListener, CoreListener

public class Controller
extends java.lang.Object
implements CoreListener, DataListener

Controller is used as a message handler for the 3 main components of the RSS application. The GUI sends Events to its the Controller, which then processes those events by starting new threads where necessary. These processes can make calls to functionality of the program, such as searching, parsing, and updating, or queries to the data source for feeds and feed items.

The Controller's main purpose is to avoid letting the GUI communicate directly with the data source or functionality classes.

Author:
Karl E. Rieb

Field Summary
static java.lang.String DEFAULT_DATA_SAVE_LOCATION
          Default location used to save feed data and application state information
 
Constructor Summary
Controller(Core guiDisplay, DataSource dataSource)
          Creates a new Controller that listens to the given Core GUI and loads/stores all data in the given DataSource.
 
Method Summary
 void coreActionPerformed(GUIEvent ge)
          Method called whenever a CoreEvent has been performed.
 void dataEventPerformed(DataEvent de)
          Method called whenever a DataEvent has been performed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATA_SAVE_LOCATION

public static final java.lang.String DEFAULT_DATA_SAVE_LOCATION
Default location used to save feed data and application state information

See Also:
Constant Field Values
Constructor Detail

Controller

public Controller(Core guiDisplay,
                  DataSource dataSource)
Creates a new Controller that listens to the given Core GUI and loads/stores all data in the given DataSource.

Parameters:
guiDisplay - Core GUI object to listen to for events
dataSource - DataSource used to load/store data
Method Detail

coreActionPerformed

public void coreActionPerformed(GUIEvent ge)
Description copied from interface: CoreListener
Method called whenever a CoreEvent has been performed.

Specified by:
coreActionPerformed in interface CoreListener
Parameters:
ge - CoreEvent that occured

dataEventPerformed

public void dataEventPerformed(DataEvent de)
Description copied from interface: DataListener
Method called whenever a DataEvent has been performed.

Specified by:
dataEventPerformed in interface DataListener
Parameters:
de - DataEvent that occured