Cleanup Code

Pushed-by: Rene Pfeuffer<rene.pfeuffer@cloudogu.com>
Co-authored-by: René Pfeuffer<rene.pfeuffer@cloudogu.com>
This commit is contained in:
Laura Gorzitze
2024-02-06 14:54:00 +01:00
parent b34a989c57
commit d8e1f2d739
910 changed files with 2670 additions and 19707 deletions

View File

@@ -24,82 +24,44 @@
package sonia.scm.server;
//~--- non-JDK imports --------------------------------------------------------
import org.apache.commons.daemon.Daemon;
import org.apache.commons.daemon.DaemonContext;
import org.apache.commons.daemon.DaemonInitException;
/**
*
* @author Sebastian Sdorra
*/
public class ScmServerDaemon implements Daemon
{
/** Field description */
private static volatile ScmServer webserver = new ScmServer();
//~--- methods --------------------------------------------------------------
private String[] daemonArgs;
/**
* Method description
*
*
* @param args
*/
public static void main(String[] args)
{
webserver.run();
}
/**
* Method description
*
*
* @param args
*
* @throws Exception
*/
public static void start(String[] args) throws Exception
{
webserver.start();
}
/**
* Method description
*
*
* @param args
*
* @throws Exception
*/
public static void stop(String[] args) throws Exception
{
webserver.stopServer();
webserver.join((long) ScmServer.GRACEFUL_TIMEOUT);
}
/**
* Method description
*
*/
@Override
@Override
public void destroy()
{
// do nothing
}
/**
* Method description
*
*
* @param context
*
* @throws DaemonInitException
* @throws Exception
*/
@Override
public void init(DaemonContext context) throws DaemonInitException, Exception
{
@@ -110,32 +72,16 @@ public class ScmServerDaemon implements Daemon
webserver.init();
}
/**
* Method description
*
*
* @throws Exception
*/
@Override
public void start() throws Exception
{
start(daemonArgs);
}
/**
* Method description
*
*
* @throws Exception
*/
@Override
public void stop() throws Exception
{
stop(daemonArgs);
}
//~--- fields ---------------------------------------------------------------
/** Field description */
private String[] daemonArgs;
}

View File

@@ -24,53 +24,28 @@
package sonia.scm.server;
/**
*
* @author Sebastian Sdorra
*/
public class ScmServerException extends RuntimeException
{
/** Field description */
private static final long serialVersionUID = -6496747280225411051L;
//~--- constructors ---------------------------------------------------------
/**
* Constructs ...
*
*/
public ScmServerException() {}
/**
* Constructs ...
*
*
* @param message
*/
public ScmServerException(String message)
{
super(message);
}
/**
* Constructs ...
*
*
* @param throwable
*/
public ScmServerException(Throwable throwable)
{
super(throwable);
}
/**
* Constructs ...
*
*
* @param message
* @param throwable
*/
public ScmServerException(String message, Throwable throwable)
{
super(message, throwable);