/** Restart the pathfinder by creating a new instance and starting this one. */ public static synchronized void restartPathfinder() { if (instance != null) { instance.saveShutdown(); StoppableStorage.getInstance().remove(instance); } instance = new Pathfinder(); instance.setUncaughtExceptionHandler(PathfinderCrashHandler.getInstance()); }
/** Private constructor. */ @SuppressWarnings("nls") private Pathfinder() { super("Pathfinder"); setDaemon(true); endLoc = new Location(); startLoc = new Location(); start(); StoppableStorage.getInstance().add(this); }