Package esmska.data
Class History
- java.lang.Object
-
- esmska.data.History
-
public class History extends java.lang.ObjectSMS history entity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHistory.RecordSingle history record
-
Field Summary
Fields Modifier and Type Field Description static intACTION_ADD_RECORDnew record addedstatic intACTION_CLEAR_RECORDSall records removedstatic intACTION_REMOVE_RECORDexisting record removed
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddActionListener(java.awt.event.ActionListener actionListener)voidaddRecord(History.Record record)add new recordvoidaddRecords(java.util.Collection<History.Record> records)add new recordsvoidclearRecords()delete all recordsHistory.RecordfindLastRecord(java.lang.String gatewayName)Find last (as in time) record sent to specified gateway.static HistorygetInstance()Get shared instanceHistory.RecordgetRecord(int index)get record at indexjava.util.List<History.Record>getRecords()get all records in unmodifiable listvoidremoveActionListener(java.awt.event.ActionListener actionListener)voidremoveRecord(History.Record record)remove existing recordvoidremoveRecords(java.util.Collection<History.Record> records)remove existing recordsvoidremoveRecordsOlderThan(java.util.Date date)Remove all records older than limit time
-
-
-
Field Detail
-
ACTION_ADD_RECORD
public static final int ACTION_ADD_RECORD
new record added- See Also:
- Constant Field Values
-
ACTION_REMOVE_RECORD
public static final int ACTION_REMOVE_RECORD
existing record removed- See Also:
- Constant Field Values
-
ACTION_CLEAR_RECORDS
public static final int ACTION_CLEAR_RECORDS
all records removed- See Also:
- Constant Field Values
-
-
Method Detail
-
addActionListener
public void addActionListener(java.awt.event.ActionListener actionListener)
-
removeActionListener
public void removeActionListener(java.awt.event.ActionListener actionListener)
-
getInstance
public static History getInstance()
Get shared instance
-
getRecords
public java.util.List<History.Record> getRecords()
get all records in unmodifiable list
-
getRecord
public History.Record getRecord(int index)
get record at index
-
addRecord
public void addRecord(History.Record record)
add new record
-
addRecords
public void addRecords(java.util.Collection<History.Record> records)
add new records
-
removeRecord
public void removeRecord(History.Record record)
remove existing record
-
removeRecords
public void removeRecords(java.util.Collection<History.Record> records)
remove existing records
-
removeRecordsOlderThan
public void removeRecordsOlderThan(java.util.Date date)
Remove all records older than limit time- Parameters:
date- limit time which records to keep, older are removed; not null
-
clearRecords
public void clearRecords()
delete all records
-
findLastRecord
public History.Record findLastRecord(java.lang.String gatewayName)
Find last (as in time) record sent to specified gateway.- Parameters:
gatewayName- name of the gateway- Returns:
- the last (the most recent) record sent to specified gateway. Null when none found.
-
-