org.gudy.azureus2.update
Class CoreUpdateChecker

java.lang.Object
  extended by org.gudy.azureus2.update.CoreUpdateChecker
All Implemented Interfaces:
Plugin, UpdatableComponent

public class CoreUpdateChecker
extends Object
implements Plugin, UpdatableComponent


Field Summary
protected  boolean first_check
           
static String LATEST_VERSION_PROPERTY
           
protected  LoggerChannel log
           
static String MESSAGE_PROPERTY
           
protected  PluginInterface plugin_interface
           
static int RD_GET_DETAILS_RETRIES
           
static int RD_GET_MIRRORS_RETRIES
           
protected  ResourceDownloaderListener rd_logger
           
static int RD_SIZE_RETRIES
           
static int RD_SIZE_TIMEOUT
           
protected  ResourceDownloaderFactory rdf
           
protected static CoreUpdateChecker singleton
           
 
Constructor Summary
CoreUpdateChecker()
           
 
Method Summary
 void checkForUpdate(UpdateChecker checker)
           
static void doUsageStats()
           
protected  void doUsageStatsSupport()
           
protected  ResourceDownloader[] getBackupDownloaders(String latest_file_name)
           
 int getMaximumCheckTime()
          estimated maximum time to check whether an update is required or not in SECONDS
 String getName()
          Name of the updatable component
protected  ResourceDownloader[] getPrimaryDownloaders(String latest_file_name)
           
protected  void handleZIPUpdate(UpdateChecker checker, InputStream data)
           
 void initialize(PluginInterface _plugin_interface)
          This method is called when the Plugin is loaded by Azureus
protected  void installUpdate(UpdateChecker checker, Update update, ResourceDownloader rd, String filename, String version, InputStream data)
           
protected  void launchUpdate(File file, String[] args)
           
static void main(String[] args)
           
protected static boolean shouldUpdate(String current_version, String latest_version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LATEST_VERSION_PROPERTY

public static final String LATEST_VERSION_PROPERTY
See Also:
Constant Field Values

MESSAGE_PROPERTY

public static final String MESSAGE_PROPERTY
See Also:
Constant Field Values

RD_GET_DETAILS_RETRIES

public static final int RD_GET_DETAILS_RETRIES
See Also:
Constant Field Values

RD_GET_MIRRORS_RETRIES

public static final int RD_GET_MIRRORS_RETRIES
See Also:
Constant Field Values

RD_SIZE_RETRIES

public static final int RD_SIZE_RETRIES
See Also:
Constant Field Values

RD_SIZE_TIMEOUT

public static final int RD_SIZE_TIMEOUT
See Also:
Constant Field Values

singleton

protected static CoreUpdateChecker singleton

plugin_interface

protected PluginInterface plugin_interface

rdf

protected ResourceDownloaderFactory rdf

log

protected LoggerChannel log

rd_logger

protected ResourceDownloaderListener rd_logger

first_check

protected boolean first_check
Constructor Detail

CoreUpdateChecker

public CoreUpdateChecker()
Method Detail

doUsageStats

public static void doUsageStats()

doUsageStatsSupport

protected void doUsageStatsSupport()

initialize

public void initialize(PluginInterface _plugin_interface)
Description copied from interface: Plugin
This method is called when the Plugin is loaded by Azureus

Specified by:
initialize in interface Plugin
Parameters:
_plugin_interface - the interface that the plugin must use to communicate with Azureus

getName

public String getName()
Description copied from interface: UpdatableComponent
Name of the updatable component

Specified by:
getName in interface UpdatableComponent
Returns:

getMaximumCheckTime

public int getMaximumCheckTime()
Description copied from interface: UpdatableComponent
estimated maximum time to check whether an update is required or not in SECONDS

Specified by:
getMaximumCheckTime in interface UpdatableComponent
Returns:

checkForUpdate

public void checkForUpdate(UpdateChecker checker)
Specified by:
checkForUpdate in interface UpdatableComponent

getPrimaryDownloaders

protected ResourceDownloader[] getPrimaryDownloaders(String latest_file_name)

getBackupDownloaders

protected ResourceDownloader[] getBackupDownloaders(String latest_file_name)

installUpdate

protected void installUpdate(UpdateChecker checker,
                             Update update,
                             ResourceDownloader rd,
                             String filename,
                             String version,
                             InputStream data)

handleZIPUpdate

protected void handleZIPUpdate(UpdateChecker checker,
                               InputStream data)
                        throws Exception
Throws:
Exception

launchUpdate

protected void launchUpdate(File file,
                            String[] args)

shouldUpdate

protected static boolean shouldUpdate(String current_version,
                                      String latest_version)

main

public static void main(String[] args)