Inheritance diagram for edu.cmu.hcii.calo.manager.HistoryManager:
The history manager just manages messages since all the things that we want to track are the results of specific messages. The engine will interact with this manager directly to add the messages and the controller will access it directly because there is nothing to model past the list since we only support adding things.
Public Member Functions | |
boolean | addHistoryItem (HistoryItem h) |
Adds a history item to be managed by the manager. | |
int | countHistoryItems () |
Counts the number of history items currently being managed. | |
boolean | hasHistoryItem (HistoryItem h) |
Returns whether or not the manager is managing the given history item. | |
Iterator< HistoryItem > | iterator () |
Returns an iterator, sorted by add time, over the history items managed by the manager. | |
void | reset () |
Resets this manager back to the way it was when it was first created. | |
Static Public Member Functions | |
static HistoryManager | getManager () |
Returns the singleton instance of this manager. | |
Private Member Functions | |
HistoryManager () | |
Constructs the HistoryManager instance. | |
void | readObject (java.io.ObjectInputStream in) throws IOException, ClassNotFoundException |
Reads in a serialized manager. | |
void | writeObject (java.io.ObjectOutputStream out) throws IOException |
Writes this manager to stream. | |
Private Attributes | |
List< HistoryItem > | history |
The notifications, sorted by priority. | |
Static Private Attributes | |
static final long | serialVersionUID = 458809417869277326L |
Prevent serialization collisions. | |
static HistoryManager | uniqueInstance = null |
The singleton instance of the notification manager. |
edu.cmu.hcii.calo.manager.HistoryManager.HistoryManager | ( | ) | [private] |
Constructs the HistoryManager instance.
Private because this is a singleton.
static HistoryManager edu.cmu.hcii.calo.manager.HistoryManager.getManager | ( | ) | [static] |
Returns the singleton instance of this manager.
boolean edu.cmu.hcii.calo.manager.HistoryManager.addHistoryItem | ( | HistoryItem | h | ) |
Adds a history item to be managed by the manager.
h | the history item to be added |
int edu.cmu.hcii.calo.manager.HistoryManager.countHistoryItems | ( | ) |
Counts the number of history items currently being managed.
boolean edu.cmu.hcii.calo.manager.HistoryManager.hasHistoryItem | ( | HistoryItem | h | ) |
Returns whether or not the manager is managing the given history item.
h | the history item to ask about |
Iterator<HistoryItem> edu.cmu.hcii.calo.manager.HistoryManager.iterator | ( | ) |
Returns an iterator, sorted by add time, over the history items managed by the manager.
void edu.cmu.hcii.calo.manager.HistoryManager.reset | ( | ) |
Resets this manager back to the way it was when it was first created.
void edu.cmu.hcii.calo.manager.HistoryManager.readObject | ( | java.io.ObjectInputStream | in | ) | throws IOException, ClassNotFoundException [private] |
Reads in a serialized manager.
Just checks against the serialVersionUID.
in | the input stream to read from |
IOException | ||
ClassNotFoundException |
void edu.cmu.hcii.calo.manager.HistoryManager.writeObject | ( | java.io.ObjectOutputStream | out | ) | throws IOException [private] |
Writes this manager to stream.
Since I don't want to deal with everything below this manager being serialized and it is a singleton, I just write the ID for error checking.
out | the output stream to write to |
IOException |
final long edu.cmu.hcii.calo.manager.HistoryManager.serialVersionUID = 458809417869277326L [static, private] |
HistoryManager edu.cmu.hcii.calo.manager.HistoryManager.uniqueInstance = null [static, private] |
The singleton instance of the notification manager.
List<HistoryItem> edu.cmu.hcii.calo.manager.HistoryManager.history [private] |
The notifications, sorted by priority.