String title = mainApp.getLocaler().getBundleText("PopupErrorTitle");
JOptionPane.showMessageDialog(mainApp.getJFrame(), msg, title, JOptionPane.ERROR_MESSAGE);
return;
}
HelloNzbHttpSrvMgr server = HelloNzbHttpSrvMgr.instance(logger);
if(btn.isSelected())
{
// start built-in HTTP(S) server
try
{
server.startServer(username, password, host, portNum, https);
}
catch(Exception ex)
{
server.shutdown();
String msg = mainApp.getLocaler().getBundleText("PopupErrorFailedToStartHttpServer") + " " + ex.getMessage();
String title = mainApp.getLocaler().getBundleText("PopupErrorTitle");
JOptionPane.showMessageDialog(mainApp.getJFrame(), msg, title, JOptionPane.ERROR_MESSAGE);
}
}
else
{
// shutdown built-in HTTP(S) server
server.shutdown();
}
}