Class CoreFactory

java.lang.Object
com.biglybt.core.CoreFactory

public class CoreFactory extends Object
  • Constructor Details

    • CoreFactory

      public CoreFactory()
  • Method Details

    • create

      public static Core create() throws CoreException
      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

      public static Core getSingleton() throws CoreException
      Once created the singleton can be accessed via this method
      Returns:
      Throws:
      CoreException
    • addCoreRunningListener

      public static void addCoreRunningListener(CoreRunningListener l)
      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