java.lang.Object
be.yildizgames.common.application.helper.restarter.ApplicationRestarter
All Implemented Interfaces:
Restarter

public class ApplicationRestarter extends Object implements Restarter
Handles restarting the application java process.
Author:
Grégory Van den Borre
  • Constructor Details

    • ApplicationRestarter

      public ApplicationRestarter(String jarName)
      Creates a new restarter with the given JAR name.
      Parameters:
      jarName - the application JAR file name
    • ApplicationRestarter

      public ApplicationRestarter(String jarName, String javaPath)
      Creates a new restarter with the given JAR name and a provided.
      Parameters:
      jarName - the application JAR file name
      javaPath - Java implementation to use.
  • Method Details

    • restart

      public final void restart()
      Description copied from interface: Restarter
      Restarts the application process immediately.
      Specified by:
      restart in interface Restarter
    • restart

      public final void restart(long msBeforeRestart)
      Description copied from interface: Restarter
      Restarts the application process after a delay.
      Specified by:
      restart in interface Restarter
      Parameters:
      msBeforeRestart - Delay before restarting in ms.