public class WhatNextManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
WhatNextManager.TimedJvmQuit
A demon thread which is started by triggerTimedQuit.
|
static class |
WhatNextManager.WhatToDoNext
The various constants for activities what the Start class should do
as next thing, typically when a dialog is closed or a games ended.
|
Modifier and Type | Field and Description |
---|---|
private int |
howManyGamesLeft |
private boolean |
interactive |
private static java.util.logging.Logger |
LOGGER |
private Options |
startOptions |
private WhatNextManager.WhatToDoNext |
whatToDoNext |
Constructor and Description |
---|
WhatNextManager(Options startOpts) |
Modifier and Type | Method and Description |
---|---|
int |
decrementHowManyGamesLeft() |
int |
getHowManyGamesLeft() |
Options |
getStartOptions() |
WhatNextManager.WhatToDoNext |
getWhatToDoNext() |
boolean |
isInteractive()
Returns true if this action was caused by interactive means.
|
void |
setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext,
boolean triggerQuitTimer)
A convenient shortcut to the 3-argument-form,
for the many calls where interactive is to be set to false.
|
void |
setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext,
boolean triggerQuitTimer,
boolean interactive)
Set the action what shall be executed next.
|
void |
setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext,
java.lang.String loadFile,
boolean interactive) |
static void |
sleepFor(long millis) |
void |
triggerTimedQuit()
Trigger a timed Quit, which will (by using a demon thread) terminate
the JVM after a timeout (currently 10 (120) seconds)
- unless the JVM has quit already anyway because cleanup has
succeeded as planned.
|
private static final java.util.logging.Logger LOGGER
private final Options startOptions
private boolean interactive
private WhatNextManager.WhatToDoNext whatToDoNext
private int howManyGamesLeft
public WhatNextManager(Options startOpts)
public WhatNextManager.WhatToDoNext getWhatToDoNext()
public boolean isInteractive()
public void setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, boolean triggerQuitTimer, boolean interactive)
whatToDoNext
- triggerQuitTimer
- interactive
- public void setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, boolean triggerQuitTimer)
whatToDoNext
- triggerQuitTimer
- public Options getStartOptions()
public void setWhatToDoNext(WhatNextManager.WhatToDoNext whatToDoNext, java.lang.String loadFile, boolean interactive)
public int getHowManyGamesLeft()
public int decrementHowManyGamesLeft()
public void triggerTimedQuit()
public static void sleepFor(long millis)