SyncInfo.java 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. package de.tudarmstadt.informatik.hostage.logging;
  2. import java.io.Serializable;
  3. import java.util.ArrayList;
  4. import java.util.HashMap;
  5. public class SyncInfo implements Serializable {
  6. private static final long serialVersionUID = 1L;
  7. /**
  8. * The first Message that should be sent when two devices want to synchronize.
  9. * It should contain a Map of devices and either the latest attack ID the device has in the database
  10. * or the time of the latest attack.
  11. *
  12. *
  13. * | A -> SyncInfo -> B |
  14. * | | ----- SyncInfo independent
  15. * | A <- SyncInfo <- B |
  16. *
  17. *
  18. * Now A looks what it has that B does not have, by comparing the device ID's and the newest entry indicator,
  19. * and sends it to B. (SyncData object)
  20. * B does the same, now these two devices should be synchronized.
  21. */
  22. public HashMap<String, Long> deviceMap;
  23. public ArrayList<String> bssids;
  24. public SyncInfo(){
  25. this.deviceMap = new HashMap<String, Long>();
  26. this.bssids = new ArrayList<String>();
  27. }
  28. }