com.aelitis.azureus.core.impl
Class AzureusCoreImpl

java.lang.Object
  extended by com.aelitis.azureus.core.impl.AzureusCoreImpl
All Implemented Interfaces:
AzureusCore

public class AzureusCoreImpl
extends Object
implements AzureusCore

Author:
parg

Field Summary
protected static AEMonitor class_mon
           
protected static AzureusCore singleton
           
static boolean SUPPRESS_CLASSLOADER_ERRORS
           
 
Fields inherited from interface com.aelitis.azureus.core.AzureusCore
CA_HIBERNATE, CA_QUIT_VUZE, CA_SHUTDOWN, CA_SLEEP
 
Constructor Summary
protected AzureusCoreImpl()
           
 
Method Summary
static void addCoreRunningListener(AzureusCoreRunningListener l)
           
 void addLifecycleListener(AzureusCoreLifecycleListener l)
           
 void addOperationListener(AzureusCoreOperationListener l)
           
 void addPowerManagementListener(PowerManagementListener listener)
           
protected  void announceAll(boolean force)
           
 boolean canStart()
           
protected  void checkCloseActions()
           
protected  boolean checkRestartAction()
           
 void checkRestartSupported()
          checks if restart operation is supported - if not an alert will be raised and an exception thrown
protected  void checkSleepActions()
           
static AzureusCore create()
           
 void createOperation(int type, AzureusCoreOperationTask task)
           
 void executeCloseAction(String action, String reason)
           
 long getCreateTime()
           
 CryptoManager getCryptoManager()
           
 GlobalManager getGlobalManager()
           
 AZInstanceManager getInstanceManager()
           
 IpFilterManager getIpFilterManager()
           
 LocaleUtil getLocaleUtil()
           
 File getLockFile()
           
 NATTraverser getNATTraverser()
           
 PluginManager getPluginManager()
           
 PluginManagerDefaults getPluginManagerDefaults()
           
static AzureusCore getSingleton()
           
 SpeedManager getSpeedManager()
           
 TRHost getTrackerHost()
           
static boolean isCoreAvailable()
           
static boolean isCoreRunning()
           
 boolean isInitThread()
           
 boolean isRestarting()
           
 boolean isStarted()
           
 void removeLifecycleListener(AzureusCoreLifecycleListener l)
           
 void removeOperationListener(AzureusCoreOperationListener l)
           
 void removePowerManagementListener(PowerManagementListener listener)
           
 void requestRestart()
          request a restart of the system - currently only available for swt based systems
 void requestStop()
          ask lifecycle listeners to perform a stop.
 void restart()
          restart the system
 void saveState()
           
 void start()
           
 void stop()
          stop the core and inform lifecycle listeners of stopping
 void triggerLifeCycleComponentCreated(AzureusCoreComponent component)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

protected static AzureusCore singleton

class_mon

protected static final AEMonitor class_mon

SUPPRESS_CLASSLOADER_ERRORS

public static boolean SUPPRESS_CLASSLOADER_ERRORS
Constructor Detail

AzureusCoreImpl

protected AzureusCoreImpl()
Method Detail

create

public static AzureusCore create()
                          throws AzureusCoreException
Throws:
AzureusCoreException

isCoreAvailable

public static boolean isCoreAvailable()

isCoreRunning

public static boolean isCoreRunning()

getSingleton

public static AzureusCore getSingleton()
                                throws AzureusCoreException
Throws:
AzureusCoreException

getCreateTime

public long getCreateTime()
Specified by:
getCreateTime in interface AzureusCore

announceAll

protected void announceAll(boolean force)

getLocaleUtil

public LocaleUtil getLocaleUtil()
Specified by:
getLocaleUtil in interface AzureusCore

getLockFile

public File getLockFile()
Specified by:
getLockFile in interface AzureusCore

canStart

public boolean canStart()
Specified by:
canStart in interface AzureusCore

start

public void start()
           throws AzureusCoreException
Specified by:
start in interface AzureusCore
Throws:
AzureusCoreException

isInitThread

public boolean isInitThread()
Specified by:
isInitThread in interface AzureusCore

isStarted

public boolean isStarted()
Specified by:
isStarted in interface AzureusCore

triggerLifeCycleComponentCreated

public void triggerLifeCycleComponentCreated(AzureusCoreComponent component)
Specified by:
triggerLifeCycleComponentCreated in interface AzureusCore

stop

public void stop()
          throws AzureusCoreException
Description copied from interface: AzureusCore
stop the core and inform lifecycle listeners of stopping

Specified by:
stop in interface AzureusCore
Throws:
AzureusCoreException

requestStop

public void requestStop()
                 throws AzureusCoreException
Description copied from interface: AzureusCore
ask lifecycle listeners to perform a stop. they may veto this by throwing an exception, or do nothing if nothing is done then it will be stopped as per "stop" above

Specified by:
requestStop in interface AzureusCore
Throws:
AzureusCoreException

restart

public void restart()
             throws AzureusCoreException
Description copied from interface: AzureusCore
restart the system

Specified by:
restart in interface AzureusCore
Throws:
AzureusCoreException

requestRestart

public void requestRestart()
                    throws AzureusCoreException
Description copied from interface: AzureusCore
request a restart of the system - currently only available for swt based systems

Specified by:
requestRestart in interface AzureusCore
Throws:
AzureusCoreException

isRestarting

public boolean isRestarting()
Specified by:
isRestarting in interface AzureusCore
Returns:

checkRestartSupported

public void checkRestartSupported()
                           throws AzureusCoreException
Description copied from interface: AzureusCore
checks if restart operation is supported - if not an alert will be raised and an exception thrown

Specified by:
checkRestartSupported in interface AzureusCore
Throws:
AzureusCoreException

saveState

public void saveState()
Specified by:
saveState in interface AzureusCore

getGlobalManager

public GlobalManager getGlobalManager()
                               throws AzureusCoreException
Specified by:
getGlobalManager in interface AzureusCore
Throws:
AzureusCoreException

getTrackerHost

public TRHost getTrackerHost()
                      throws AzureusCoreException
Specified by:
getTrackerHost in interface AzureusCore
Throws:
AzureusCoreException

getPluginManagerDefaults

public PluginManagerDefaults getPluginManagerDefaults()
                                               throws AzureusCoreException
Specified by:
getPluginManagerDefaults in interface AzureusCore
Throws:
AzureusCoreException

getPluginManager

public PluginManager getPluginManager()
                               throws AzureusCoreException
Specified by:
getPluginManager in interface AzureusCore
Throws:
AzureusCoreException

getIpFilterManager

public IpFilterManager getIpFilterManager()
                                   throws AzureusCoreException
Specified by:
getIpFilterManager in interface AzureusCore
Throws:
AzureusCoreException

getInstanceManager

public AZInstanceManager getInstanceManager()
Specified by:
getInstanceManager in interface AzureusCore

getSpeedManager

public SpeedManager getSpeedManager()
Specified by:
getSpeedManager in interface AzureusCore

getCryptoManager

public CryptoManager getCryptoManager()
Specified by:
getCryptoManager in interface AzureusCore

getNATTraverser

public NATTraverser getNATTraverser()
Specified by:
getNATTraverser in interface AzureusCore

checkSleepActions

protected void checkSleepActions()

checkRestartAction

protected boolean checkRestartAction()

checkCloseActions

protected void checkCloseActions()

executeCloseAction

public void executeCloseAction(String action,
                               String reason)
Specified by:
executeCloseAction in interface AzureusCore

createOperation

public void createOperation(int type,
                            AzureusCoreOperationTask task)
Specified by:
createOperation in interface AzureusCore

addLifecycleListener

public void addLifecycleListener(AzureusCoreLifecycleListener l)
Specified by:
addLifecycleListener in interface AzureusCore

removeLifecycleListener

public void removeLifecycleListener(AzureusCoreLifecycleListener l)
Specified by:
removeLifecycleListener in interface AzureusCore

addOperationListener

public void addOperationListener(AzureusCoreOperationListener l)
Specified by:
addOperationListener in interface AzureusCore

removeOperationListener

public void removeOperationListener(AzureusCoreOperationListener l)
Specified by:
removeOperationListener in interface AzureusCore

addCoreRunningListener

public static void addCoreRunningListener(AzureusCoreRunningListener l)

addPowerManagementListener

public void addPowerManagementListener(PowerManagementListener listener)
Specified by:
addPowerManagementListener in interface AzureusCore

removePowerManagementListener

public void removePowerManagementListener(PowerManagementListener listener)
Specified by:
removePowerManagementListener in interface AzureusCore