Added checks to make sure expected system properties are present.
This commit is contained in:
parent
3b0eb64f1c
commit
9461b31edd
@ -59,6 +59,18 @@ public class WebSocketSslServer {
|
||||
Logger.getLogger("").addHandler(ch);
|
||||
Logger.getLogger("").setLevel(Level.FINE);
|
||||
|
||||
String keyStoreFilePath = System.getProperty("keystore.file.path");
|
||||
if (keyStoreFilePath == null || keyStoreFilePath.isEmpty()) {
|
||||
System.out.println("ERROR: System property keystore.file.path not set. Exiting now!");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
String keyStoreFilePassword = System.getProperty("keystore.file.password");
|
||||
if (keyStoreFilePassword == null || keyStoreFilePassword.isEmpty()) {
|
||||
System.out.println("ERROR: System property keystore.file.password not set. Exiting now!");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
// Configure the server.
|
||||
ServerBootstrap bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(
|
||||
Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user