Package com.biglybt.core
Class CoreFactory
java.lang.Object
com.biglybt.core.CoreFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Adds a listener that is triggered once the core is running.static Core
create()
Core is a singleton that must be initially created by someone, and initialisedstatic Core
Once created the singleton can be accessed via this methodstatic boolean
Returns whether the core is available.static boolean
Returns whether the core is running.
-
Constructor Details
-
CoreFactory
public CoreFactory()
-
-
Method Details
-
create
Core is a singleton that must be initially created by someone, and initialised- Returns:
- Throws:
CoreException
-
isCoreAvailable
public static boolean isCoreAvailable()Returns whether the core is available. All features of the core (such as GlobalManager) may not be available yet.- Returns:
-
isCoreRunning
public static boolean isCoreRunning()Returns whether the core is running. All features of the core (GlobalManager) should be available when the result is true.- Returns:
-
getSingleton
Once created the singleton can be accessed via this method- Returns:
- Throws:
CoreException
-
addCoreRunningListener
Adds a listener that is triggered once the core is running.This is in CoreFactory instead of
CoreLifecycleListener
so that listeners can be added before the core instance is even created.- Parameters:
l
- Listener to trigger when the core is running. If the core is already running, listener is fired immediately
-