forked from Qortal/qortal
Removed the word "service" from all settings, to avoid confusion with arbitrary data services.
Updated setting names: domainMapServiceEnabled -> domainMapEnabled domainMapServicePort -> domainMapPort gatewayServiceEnabled -> gatewayEnabled gatewayServicePort -> gatewayPort
This commit is contained in:
parent
c7c88dec04
commit
cc297ccfcd
@ -88,7 +88,7 @@ public class DomainMapService {
|
||||
|
||||
HttpConfiguration httpConfig = new HttpConfiguration();
|
||||
httpConfig.setSecureScheme("https");
|
||||
httpConfig.setSecurePort(Settings.getInstance().getDomainMapServicePort());
|
||||
httpConfig.setSecurePort(Settings.getInstance().getDomainMapPort());
|
||||
|
||||
SecureRequestCustomizer src = new SecureRequestCustomizer();
|
||||
httpConfig.addCustomizer(src);
|
||||
@ -100,13 +100,13 @@ public class DomainMapService {
|
||||
new DetectorConnectionFactory(sslConnectionFactory),
|
||||
httpConnectionFactory);
|
||||
portUnifiedConnector.setHost(Settings.getInstance().getBindAddress());
|
||||
portUnifiedConnector.setPort(Settings.getInstance().getDomainMapServicePort());
|
||||
portUnifiedConnector.setPort(Settings.getInstance().getDomainMapPort());
|
||||
|
||||
this.server.addConnector(portUnifiedConnector);
|
||||
} else {
|
||||
// Non-SSL
|
||||
InetAddress bindAddr = InetAddress.getByName(Settings.getInstance().getBindAddress());
|
||||
InetSocketAddress endpoint = new InetSocketAddress(bindAddr, Settings.getInstance().getDomainMapServicePort());
|
||||
InetSocketAddress endpoint = new InetSocketAddress(bindAddr, Settings.getInstance().getDomainMapPort());
|
||||
this.server = new Server(endpoint);
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ public class GatewayService {
|
||||
|
||||
HttpConfiguration httpConfig = new HttpConfiguration();
|
||||
httpConfig.setSecureScheme("https");
|
||||
httpConfig.setSecurePort(Settings.getInstance().getGatewayServicePort());
|
||||
httpConfig.setSecurePort(Settings.getInstance().getGatewayPort());
|
||||
|
||||
SecureRequestCustomizer src = new SecureRequestCustomizer();
|
||||
httpConfig.addCustomizer(src);
|
||||
@ -99,13 +99,13 @@ public class GatewayService {
|
||||
new DetectorConnectionFactory(sslConnectionFactory),
|
||||
httpConnectionFactory);
|
||||
portUnifiedConnector.setHost(Settings.getInstance().getBindAddress());
|
||||
portUnifiedConnector.setPort(Settings.getInstance().getGatewayServicePort());
|
||||
portUnifiedConnector.setPort(Settings.getInstance().getGatewayPort());
|
||||
|
||||
this.server.addConnector(portUnifiedConnector);
|
||||
} else {
|
||||
// Non-SSL
|
||||
InetAddress bindAddr = InetAddress.getByName(Settings.getInstance().getBindAddress());
|
||||
InetSocketAddress endpoint = new InetSocketAddress(bindAddr, Settings.getInstance().getGatewayServicePort());
|
||||
InetSocketAddress endpoint = new InetSocketAddress(bindAddr, Settings.getInstance().getGatewayPort());
|
||||
this.server = new Server(endpoint);
|
||||
}
|
||||
|
||||
|
@ -510,8 +510,8 @@ public class Controller extends Thread {
|
||||
return; // Not System.exit() so that GUI can display error
|
||||
}
|
||||
|
||||
if (Settings.getInstance().isGatewayServiceEnabled()) {
|
||||
LOGGER.info(String.format("Starting gateway service on port %d", Settings.getInstance().getGatewayServicePort()));
|
||||
if (Settings.getInstance().isGatewayEnabled()) {
|
||||
LOGGER.info(String.format("Starting gateway service on port %d", Settings.getInstance().getGatewayPort()));
|
||||
try {
|
||||
GatewayService gatewayService = GatewayService.getInstance();
|
||||
gatewayService.start();
|
||||
@ -523,8 +523,8 @@ public class Controller extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
if (Settings.getInstance().isDomainMapServiceEnabled()) {
|
||||
LOGGER.info(String.format("Starting domain map service on port %d", Settings.getInstance().getDomainMapServicePort()));
|
||||
if (Settings.getInstance().isDomainMapEnabled()) {
|
||||
LOGGER.info(String.format("Starting domain map service on port %d", Settings.getInstance().getDomainMapPort()));
|
||||
try {
|
||||
DomainMapService domainMapService = DomainMapService.getInstance();
|
||||
domainMapService.start();
|
||||
|
@ -38,11 +38,11 @@ public class Settings {
|
||||
private static final int MAINNET_API_PORT = 12393;
|
||||
private static final int TESTNET_API_PORT = 62393;
|
||||
|
||||
private static final int MAINNET_DOMAIN_MAP_SERVICE_PORT = 80;
|
||||
private static final int TESTNET_DOMAIN_MAP_SERVICE_PORT = 8080;
|
||||
private static final int MAINNET_DOMAIN_MAP_PORT = 80;
|
||||
private static final int TESTNET_DOMAIN_MAP_PORT = 8080;
|
||||
|
||||
private static final int MAINNET_GATEWAY_SERVICE_PORT = 80;
|
||||
private static final int TESTNET_GATEWAY_SERVICE_PORT = 8080;
|
||||
private static final int MAINNET_GATEWAY_PORT = 80;
|
||||
private static final int TESTNET_GATEWAY_PORT = 8080;
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger(Settings.class);
|
||||
private static final String SETTINGS_FILENAME = "settings.json";
|
||||
@ -91,14 +91,14 @@ public class Settings {
|
||||
private String sslKeystorePassword = null;
|
||||
|
||||
// Domain mapping
|
||||
private Integer domainMapServicePort;
|
||||
private boolean domainMapServiceEnabled = false;
|
||||
private Integer domainMapPort;
|
||||
private boolean domainMapEnabled = false;
|
||||
private boolean domainMapLoggingEnabled = false;
|
||||
private List<DomainMap> domainMap = null;
|
||||
|
||||
// Gateway
|
||||
private Integer gatewayServicePort;
|
||||
private boolean gatewayServiceEnabled = false;
|
||||
private Integer gatewayPort;
|
||||
private boolean gatewayEnabled = false;
|
||||
private boolean gatewayLoggingEnabled = false;
|
||||
|
||||
// Specific to this node
|
||||
@ -526,15 +526,15 @@ public class Settings {
|
||||
return this.sslKeystorePassword;
|
||||
}
|
||||
|
||||
public int getDomainMapServicePort() {
|
||||
if (this.domainMapServicePort != null)
|
||||
return this.domainMapServicePort;
|
||||
public int getDomainMapPort() {
|
||||
if (this.domainMapPort != null)
|
||||
return this.domainMapPort;
|
||||
|
||||
return this.isTestNet ? TESTNET_DOMAIN_MAP_SERVICE_PORT : MAINNET_DOMAIN_MAP_SERVICE_PORT;
|
||||
return this.isTestNet ? TESTNET_DOMAIN_MAP_PORT : MAINNET_DOMAIN_MAP_PORT;
|
||||
}
|
||||
|
||||
public boolean isDomainMapServiceEnabled() {
|
||||
return this.domainMapServiceEnabled;
|
||||
public boolean isDomainMapEnabled() {
|
||||
return this.domainMapEnabled;
|
||||
}
|
||||
|
||||
public boolean isDomainMapLoggingEnabled() {
|
||||
@ -555,15 +555,15 @@ public class Settings {
|
||||
}
|
||||
|
||||
|
||||
public int getGatewayServicePort() {
|
||||
if (this.gatewayServicePort != null)
|
||||
return this.gatewayServicePort;
|
||||
public int getGatewayPort() {
|
||||
if (this.gatewayPort != null)
|
||||
return this.gatewayPort;
|
||||
|
||||
return this.isTestNet ? TESTNET_GATEWAY_SERVICE_PORT : MAINNET_GATEWAY_SERVICE_PORT;
|
||||
return this.isTestNet ? TESTNET_GATEWAY_PORT : MAINNET_GATEWAY_PORT;
|
||||
}
|
||||
|
||||
public boolean isGatewayServiceEnabled() {
|
||||
return this.gatewayServiceEnabled;
|
||||
public boolean isGatewayEnabled() {
|
||||
return this.gatewayEnabled;
|
||||
}
|
||||
|
||||
public boolean isGatewayLoggingEnabled() {
|
||||
|
Loading…
Reference in New Issue
Block a user