Class CoreFactory


  • public class CoreFactory
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      CoreFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addCoreRunningListener​(CoreRunningListener l)
      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 initialised
      static Core getSingleton()
      Once created the singleton can be accessed via this method
      static boolean isCoreAvailable()
      Returns whether the core is available.
      static boolean isCoreRunning()
      Returns whether the core is running.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CoreFactory

        public CoreFactory()
    • Method Detail

      • 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