protected final void doStopServer(String[] theArgs,
Thread theRunningServerThread) throws Exception {
try
{
Class enhydraClass =
Class.forName("com.lutris.multiServer.MultiServer");
Method shutDownMethod = enhydraClass.getMethod("shutdown", null);
shutDownMethod.invoke(null, null);
}
catch (Exception e)
{
e.printStackTrace();
throw new RuntimeException("Cannot stop running instance of "
+ "MultiServer");
}
}
Stops the Enhydra server. We use reflection so that the Enhydra jars do
not need to be in the classpath to compile this class. |