public final class MessageNotifier extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
MessageNotifier.Worker |
Modifier and Type | Field and Description |
---|---|
private static ScheduledExecutorService |
EXECUTOR |
static IntegerProperty |
PROP_INTERVAL
Property defining the update interval in minutes
|
static BooleanProperty |
PROP_NOTIFIER_ENABLED
Property defining if this task is enabled or not
|
private static ScheduledFuture<?> |
task |
private static Runnable |
WORKER |
Modifier | Constructor and Description |
---|---|
private |
MessageNotifier() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isRunning()
Determines if the message notifier is currently running
|
static boolean |
isUserEnoughIdentified()
Determines if user set enough information in JOSM preferences to make the request to OSM API without
prompting him for a password.
|
static void |
start()
Starts the message notifier task if not already started and if user is fully identified
|
static void |
stop()
Stops the message notifier task if started
|
public static final BooleanProperty PROP_NOTIFIER_ENABLED
public static final IntegerProperty PROP_INTERVAL
private static final ScheduledExecutorService EXECUTOR
private static ScheduledFuture<?> task
private MessageNotifier()
public static void start()
public static void stop()
public static boolean isRunning()
true
if the notifier is running, false
otherwisepublic static boolean isUserEnoughIdentified()
true
if user chose an OAuth token or supplied both its username and password, false otherwise