X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FGigi.java;h=e426a6d473ccae82888a04af845750c870668acf;hb=226dd3a5e589ad8269585a0767819619166eebf4;hp=4e96e9a0477f568dbf1570f446463964f20d902b;hpb=f1f20db659050299bb4bab64d083b4e193ae3f61;p=gigi.git diff --git a/src/org/cacert/gigi/Gigi.java b/src/org/cacert/gigi/Gigi.java index 4e96e9a0..e426a6d4 100644 --- a/src/org/cacert/gigi/Gigi.java +++ b/src/org/cacert/gigi/Gigi.java @@ -2,6 +2,7 @@ package org.cacert.gigi; import java.io.IOException; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; import java.security.KeyStore; import java.security.cert.X509Certificate; import java.util.Calendar; @@ -19,6 +20,7 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.cacert.gigi.database.DatabaseConnection; +import org.cacert.gigi.dbObjects.DomainPingConfiguration; import org.cacert.gigi.dbObjects.User; import org.cacert.gigi.localisation.Language; import org.cacert.gigi.output.Menu; @@ -148,7 +150,11 @@ public class Gigi extends HttpServlet { } } - putPage("/wot/rules", new StaticPage("Web of Trust Rules", AssurePage.class.getResourceAsStream("Rules.templ")), "Web of Trust"); + try { + putPage("/wot/rules", new StaticPage("Web of Trust Rules", AssurePage.class.getResourceAsStream("Rules.templ")), "Web of Trust"); + } catch (UnsupportedEncodingException e) { + throw new ServletException(e); + } baseTemplate = new Template(Gigi.class.getResource("Gigi.templ")); rootMenu = new Menu("Main"); Menu about = new Menu("About CAcert.org"); @@ -400,7 +406,17 @@ public class Gigi extends HttpServlet { return instance.reveresePages.get(p).replaceFirst("/?\\*$", ""); } - public static void notifyPinger() { + /** + * Requests Pinging of domains. + * + * @param toReping + * if not null, the {@link DomainPingConfiguration} to test, if + * null, just re-check if there is something to do. + */ + public static void notifyPinger(DomainPingConfiguration toReping) { + if (toReping != null) { + instance.pinger.queue(toReping); + } instance.pinger.interrupt(); }