Renamed WebSocketServer to WebServer

This commit is contained in:
Rsl1122 2017-07-29 12:16:19 +03:00
parent 75af8b58f8
commit a2f7587b8d
3 changed files with 9 additions and 9 deletions

View File

@ -37,7 +37,7 @@ import main.java.com.djrapitops.plan.database.Database;
import main.java.com.djrapitops.plan.database.databases.MySQLDB;
import main.java.com.djrapitops.plan.database.databases.SQLiteDB;
import main.java.com.djrapitops.plan.ui.html.Html;
import main.java.com.djrapitops.plan.ui.webserver.WebSocketServer;
import main.java.com.djrapitops.plan.ui.webserver.WebServer;
import main.java.com.djrapitops.plan.utilities.Benchmark;
import main.java.com.djrapitops.plan.utilities.Check;
import main.java.com.djrapitops.plan.utilities.MiscUtils;
@ -73,7 +73,7 @@ public class Plan extends BukkitPlugin<Plan> {
private Database db;
private HashSet<Database> databases;
private WebSocketServer uiServer;
private WebServer uiServer;
private ServerVariableHolder serverVariableHolder;
private int bootAnalysisTaskID = -1;
@ -180,7 +180,7 @@ public class Plan extends BukkitPlugin<Plan> {
boolean hasDataViewCapability = usingAlternativeIP || usingAlternativeUI || webserverIsEnabled;
if (webserverIsEnabled) {
uiServer = new WebSocketServer(this);
uiServer = new WebServer(this);
uiServer.initServer();
if (!uiServer.isEnabled()) {
Log.error("WebServer was not Initialized.");
@ -471,7 +471,7 @@ public class Plan extends BukkitPlugin<Plan> {
*
* @return the Webserver
*/
public WebSocketServer getUiServer() {
public WebServer getUiServer() {
return uiServer;
}

View File

@ -12,7 +12,7 @@ import main.java.com.djrapitops.plan.data.additional.PluginData;
import main.java.com.djrapitops.plan.data.cache.DBCallableProcessor;
import main.java.com.djrapitops.plan.data.handling.info.HandlingInfo;
import main.java.com.djrapitops.plan.ui.html.DataRequestHandler;
import main.java.com.djrapitops.plan.ui.webserver.WebSocketServer;
import main.java.com.djrapitops.plan.ui.webserver.WebServer;
import main.java.com.djrapitops.plan.utilities.HtmlUtils;
import java.sql.SQLException;
@ -173,7 +173,7 @@ public class API {
* @return player.html with all placeholders replaced.
*/
public String getPlayerHtmlAsString(UUID uuid) {
WebSocketServer server = plugin.getUiServer();
WebServer server = plugin.getUiServer();
if (Verify.notNull(server)) {
return server.getDataReqHandler().getInspectHtml(uuid);
}
@ -208,7 +208,7 @@ public class API {
* @return analysis.html with all placeholders replaced.
*/
public String getAnalysisHtmlAsString() {
WebSocketServer server = plugin.getUiServer();
WebServer server = plugin.getUiServer();
if (Verify.notNull(server)) {
return server.getDataReqHandler().getAnalysisHtml();
}

View File

@ -31,7 +31,7 @@ import java.util.concurrent.Executors;
/**
* @author Rsl1122
*/
public class WebSocketServer {
public class WebServer {
private final Plan plugin;
private final DataRequestHandler dataReqHandler;
@ -47,7 +47,7 @@ public class WebSocketServer {
*
* @param plugin Current instance of Plan
*/
public WebSocketServer(Plan plugin) {
public WebServer(Plan plugin) {
this.plugin = plugin;
this.port = Settings.WEBSERVER_PORT.getNumber();
shutdown = false;