123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- package de.tudarmstadt.informatik.hostage.logging;
- import java.util.ArrayList;
- /**
- * Interface to define which functionality is needed for a Logger in this application.
- * @author Mihai Plasoianu
- * @author Lars Pandikow
- *
- */
- public interface Logger {
- /**
- * Write a single Record to the log.
- * @param record The Record that has to be added.
- */
- void write(Record record);
-
- /**
- * Returns all saved Records.
- * @return ArrayList which contains all Records from the log.
- */
- ArrayList<Record> getAllRecords();
- /**
- * Returns a single Record as representative for each attack with an attack id higher then the given.
- * @param lastUploadedAttackId The threshold value for attack id's
- * @return ArrayList which contains one Record for each attack.
- */
- ArrayList<Record> getRecordOfEachAttack(int lastUploadedAttackId);
- /**
- *
- * @param attack_id Attack id of the record
- * @return A Record with a specific attack id, or null if there is no Record with such an attack id.
- */
- Record getRecordOfAttackId(long attack_id);
-
- /**
- * Determines the number of recorded attacks.
- * @return he Number of Attacks.
- */
- int getAttackCount();
- /**
- * Returns the number of recorded attack for a specific protocol.
- * @param protocol The considered protocol.
- * @return The Number of recorded attacks per protocol.
- */
- int getAttackPerProtokolCount(String protocol);
- /**
- * Finds the smallest saved attack id.
- * @return The smallest saved attack id.
- */
- long getSmallestAttackId();
- /**
- * Finds the highest saved attack id.
- * @return The highest saved attack id.
- */
- long getHighestAttackId();
-
- /**
- * Determines if an attack on a given protocol has already been recorded in a network with a specific BSSID.
- * @param protocol The considered protocol.
- * @param bssid The considered BSSID.
- * @return True if there has been a attack on a protocol in a network with the given BSSID, else returns false.
- */
- boolean bssidSeen(String protocol, String bssid);
- /**
- * Returns all BSSIDs in which an attack has been recorded.
- * @return String arrays with all recorded BSSIDs
- */
- String[] getAllBSSIDS();
- /**
- * Returns the last known SSID of a network with a specific BSSID.
- * @param bssid The considered BSSID.
- * @return String representation of the searched SSID, or null if there is no entry with the given BSSID
- */
- String getSSID(String bssid);
-
- /**
- * Deletes all Records with a smaller time stamp than the given.
- * @param time The time stamp to compare with.
- */
- void deleteByDate(long time);
- /**
- * Deletes all Record which contain the given BSSID.
- * @param bssid The BSSID to compare with.
- */
- void deleteByBSSID(String bssid);
- /**
- * Resets complete log file.
- */
- void clearData();
- }
|