From: David ‘Bombe’ Roden Date: Fri, 5 Nov 2010 09:27:09 +0000 (+0100) Subject: Don’t extend AbstractService for the web interface, it’s unnecessary. X-Git-Tag: 0.2-RC1~26 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=baf3fd619b3f87c95111e522fb5cfc043a5d2881 Don’t extend AbstractService for the web interface, it’s unnecessary. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index fce52c4..439c732 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -57,7 +57,6 @@ import net.pterodactylus.sone.web.page.PageToadlet; import net.pterodactylus.sone.web.page.PageToadletFactory; import net.pterodactylus.sone.web.page.StaticPage; import net.pterodactylus.util.logging.Logging; -import net.pterodactylus.util.service.AbstractService; import net.pterodactylus.util.template.DateFilter; import net.pterodactylus.util.template.DefaultTemplateFactory; import net.pterodactylus.util.template.MatchFilter; @@ -78,7 +77,7 @@ import freenet.l10n.BaseL10n; * * @author David ‘Bombe’ Roden */ -public class WebInterface extends AbstractService { +public class WebInterface { /** The logger. */ private static final Logger logger = Logging.getLogger(WebInterface.class); @@ -99,7 +98,6 @@ public class WebInterface extends AbstractService { * The Sone plugin */ public WebInterface(SonePlugin sonePlugin) { - super("Sone Web Interface", false); this.sonePlugin = sonePlugin; formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword(); } @@ -150,22 +148,20 @@ public class WebInterface extends AbstractService { } // - // SERVICE METHODS + // ACTIONS // /** - * {@inheritDoc} + * Starts the web interface and registers all toadlets. */ - @Override - protected void serviceStart() { + public void start() { registerToadlets(); } /** - * {@inheritDoc} + * Stops the web interface and unregisters all toadlets. */ - @Override - protected void serviceStop() { + public void stop() { unregisterToadlets(); }