com.aelitis.azureus.core
Class AzureusCoreFactory

java.lang.Object
  extended by com.aelitis.azureus.core.AzureusCoreFactory

public class AzureusCoreFactory
extends java.lang.Object


Constructor Summary
AzureusCoreFactory()
           
 
Method Summary
static void addCoreRunningListener(AzureusCoreRunningListener l)
          Adds a listener that is triggered once the core is running.
static AzureusCore create()
          Azureus core is a singleton that must be initially created by someone, and initialised
static AzureusCore 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

AzureusCoreFactory

public AzureusCoreFactory()
Method Detail

create

public static AzureusCore create()
                          throws AzureusCoreException
Azureus core is a singleton that must be initially created by someone, and initialised

Returns:
Throws:
AzureusCoreException

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 AzureusCore getSingleton()
                                throws AzureusCoreException
Once created the singleton can be accessed via this method

Returns:
Throws:
AzureusCoreException

addCoreRunningListener

public static void addCoreRunningListener(AzureusCoreRunningListener l)
Adds a listener that is triggered once the core is running.

This is in AzureusCoreFactory instead of AzureusCoreLifecycleListener 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