import club.wpia.gigi.database.DatabaseConnection.Link;
import club.wpia.gigi.database.GigiPreparedStatement;
import club.wpia.gigi.database.GigiResultSet;
+import club.wpia.gigi.dbObjects.Certificate.RevocationType;
import club.wpia.gigi.dbObjects.Domain;
import club.wpia.gigi.dbObjects.DomainPingConfiguration;
import club.wpia.gigi.dbObjects.DomainPingType;
import club.wpia.gigi.util.RandomToken;
+/**
+ * <p>
+ * This thread is executing pings for domains, if the last ping is older than a
+ * specific amount of time.
+ * </p>
+ * <p>
+ * When a ping fails the corresponding domain becomes unverified. If the ping
+ * succeeds the domains becomes verified and all other domain with the same name
+ * become unverified.
+ * </p>
+ * <p>
+ * When a domain becomes unverified and has still certificated attached to it
+ * the certificates will become "pending for revocation". This state is removed
+ * when the domain is successfully verified again. When this state prolongs for
+ * more than 2 weeks, such certificates are revoked with type
+ * {@link RevocationType#PING_TIMEOUT}.
+ * </p>
+ */
public class PingerDaemon extends Thread {
HashMap<DomainPingType, DomainPinger> pingers = new HashMap<>();