public final class LCCore extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LCCore.Environment
Interface to implement according to the environment.
|
static interface |
LCCore.MainThreadExecutor
Interface to implement to override the main thread executor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
executeInMainThread(Runnable toExecute)
Ask to execute the given Runnable in the main thread as soon as the thread is available.
|
static LCCore.Environment |
get()
Return the environment.
|
static Application |
getApplication() |
static Thread |
getMainThread() |
static void |
initEnvironment()
Initialize properties.
|
static boolean |
isStarted()
Return true if the environment is already started.
|
static boolean |
isStopping() |
static void |
keepMainThread(Runnable toContinue)
Because some systems may need to use the main thread for specific action (like Cocoa),
we keep the current thread aside, and continue on a new thread.
|
static void |
replaceMainThreadExecutor(LCCore.MainThreadExecutor executor)
Replace the main thread executor.
|
static void |
set(LCCore.Environment env)
Set the environment.
|
static void |
start()
Initialization.
|
static MutableBoolean |
stop(boolean forceJvmToStop)
Stop the environement.
|
public static LCCore.Environment get()
public static void set(LCCore.Environment env)
public static void initEnvironment()
public static boolean isStarted()
public static void start()
public static Application getApplication()
public static boolean isStopping()
public static MutableBoolean stop(boolean forceJvmToStop)
public static void keepMainThread(Runnable toContinue)
toContinue - the Runnable to run on a new Thread to continue the application startuppublic static Thread getMainThread()
public static void executeInMainThread(Runnable toExecute)
public static void replaceMainThreadExecutor(LCCore.MainThreadExecutor executor)
Copyright © 2019. All rights reserved.