public class Switchboard
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Switchboard.InfoUpdater |
static class |
Switchboard.shutdownHookThread
This class is a helper class whose instance is started, when the java virtual
machine shuts down.
|
Modifier and Type | Field and Description |
---|---|
static javax.swing.text.JTextComponent |
InfoBox |
private static java.lang.String |
InfoBoxMessage |
private static long |
InfoBoxMessageUntil |
static ConcurrentLog |
log |
private static java.util.Properties |
properties
a global properties object
|
private static boolean |
shallrun
the shallrun variable is used
by all application parts to see if they must terminate
|
Constructor and Description |
---|
Switchboard() |
Modifier and Type | Method and Description |
---|---|
static void |
addShutdownHook(java.lang.Thread mainThread,
java.util.concurrent.Semaphore semaphore) |
static java.lang.String |
get(java.lang.String key)
access to the properties object
|
static java.lang.String |
get(java.lang.String key,
java.lang.String dflt)
access to the properties object
|
static boolean |
getBool(java.lang.String key,
boolean dflt)
convenience access to boolean values in properties
|
static java.io.File |
getFile(java.lang.String key) |
static int |
getInt(java.lang.String key,
int dflt)
convenience access to integer values in properties
|
static void |
info(java.lang.String infoString,
long infoTime) |
static void |
load(java.io.File propFile)
initialize the properties with the content of a file
|
static void |
set(java.lang.String key,
boolean value)
convenience method to set a boolean property
|
static void |
set(java.lang.String key,
int value)
convenience method to set a integer property
|
static void |
set(java.lang.String key,
java.lang.String value)
set a property
|
static boolean |
shallrun()
test if the application shall run
|
static void |
shutdown()
set a termination signal.
|
static void |
startInfoUpdater() |
private static boolean shallrun
private static java.util.Properties properties
public static final ConcurrentLog log
public static javax.swing.text.JTextComponent InfoBox
private static java.lang.String InfoBoxMessage
private static long InfoBoxMessageUntil
public static void startInfoUpdater()
public static void addShutdownHook(java.lang.Thread mainThread, java.util.concurrent.Semaphore semaphore)
public static void info(java.lang.String infoString, long infoTime)
public static boolean shallrun()
public static void shutdown()
public static void load(java.io.File propFile)
propFile
- public static java.lang.String get(java.lang.String key)
key
- public static java.lang.String get(java.lang.String key, java.lang.String dflt)
key
- dflt
- public static int getInt(java.lang.String key, int dflt)
key
- dflt
- public static boolean getBool(java.lang.String key, boolean dflt)
key
- dflt
- public static java.io.File getFile(java.lang.String key)
public static void set(java.lang.String key, java.lang.String value)
key
- value
- public static void set(java.lang.String key, int value)
key
- value
- public static void set(java.lang.String key, boolean value)
key
- value
-