org.gudy.azureus2.pluginsimpl.local.update
Class UpdateManagerImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.update.UpdateManagerImpl
All Implemented Interfaces:
UpdateCheckInstanceListener, UpdateManager

public class UpdateManagerImpl
extends java.lang.Object
implements UpdateManager, UpdateCheckInstanceListener


Field Summary
protected  AEMonitor this_mon
           
 
Constructor Summary
protected UpdateManagerImpl(AzureusCore _azureus_core)
           
 
Method Summary
 void addListener(UpdateManagerListener l)
           
 void addVerificationListener(UpdateManagerVerificationListener l)
           
 void applyUpdates(boolean restart_after)
          applies any updates and stops or restarts Azureus
 void cancelled(UpdateCheckInstance instance)
           
 void complete(UpdateCheckInstance instance)
           
 UpdateCheckInstanceImpl createEmptyUpdateCheckInstance(int type, java.lang.String name)
          creates an update check instance with no attached updateable components (as opposed to automatically including all registered
 UpdateCheckInstanceImpl createEmptyUpdateCheckInstance(int type, java.lang.String name, boolean low_noise)
           
 UpdateInstaller createInstaller()
          create a stand alone update installer.
 UpdateCheckInstance createUpdateCheckInstance()
          creates an update check instance with currently registered updatable components Default check type is "UCI_UPDATE"
 UpdateCheckInstance createUpdateCheckInstance(int type, java.lang.String name)
          creates an update check instance with currently registered updatable components
 UpdateCheckInstance[] getCheckInstances()
           
protected  AzureusCore getCore()
           
 java.lang.String getInstallDir()
           
 UpdateInstaller[] getInstallers()
          returns the currently declared installers, if any
static UpdateManager getSingleton(AzureusCore core)
           
 java.lang.String getUserDir()
           
 void registerUpdatableComponent(UpdatableComponent component, boolean mandatory)
          All updateable components must register in order to receive update check events
protected  void removeInstaller(UpdateInstaller installer)
           
 void removeListener(UpdateManagerListener l)
           
 void removeVerificationListener(UpdateManagerVerificationListener l)
           
 void restart()
          restart azureus after applying any updates
 java.io.InputStream verifyData(Update update, java.io.InputStream is, boolean force)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

this_mon

protected AEMonitor this_mon
Constructor Detail

UpdateManagerImpl

protected UpdateManagerImpl(AzureusCore _azureus_core)
Method Detail

getSingleton

public static UpdateManager getSingleton(AzureusCore core)

getCore

protected AzureusCore getCore()

registerUpdatableComponent

public void registerUpdatableComponent(UpdatableComponent component,
                                       boolean mandatory)
Description copied from interface: UpdateManager
All updateable components must register in order to receive update check events

Specified by:
registerUpdatableComponent in interface UpdateManager
mandatory - indicates that this component must successfully complete checking for any overall update check to complete

getCheckInstances

public UpdateCheckInstance[] getCheckInstances()
Specified by:
getCheckInstances in interface UpdateManager

createUpdateCheckInstance

public UpdateCheckInstance createUpdateCheckInstance()
Description copied from interface: UpdateManager
creates an update check instance with currently registered updatable components Default check type is "UCI_UPDATE"

Specified by:
createUpdateCheckInstance in interface UpdateManager
Returns:

createUpdateCheckInstance

public UpdateCheckInstance createUpdateCheckInstance(int type,
                                                     java.lang.String name)
Description copied from interface: UpdateManager
creates an update check instance with currently registered updatable components

Specified by:
createUpdateCheckInstance in interface UpdateManager
Parameters:
type - see UpdateCheckInstance.UCI_xx
name - name of the update instance

createEmptyUpdateCheckInstance

public UpdateCheckInstanceImpl createEmptyUpdateCheckInstance(int type,
                                                              java.lang.String name)
Description copied from interface: UpdateManager
creates an update check instance with no attached updateable components (as opposed to automatically including all registered

Specified by:
createEmptyUpdateCheckInstance in interface UpdateManager
Parameters:
type - see UpdateCheckInstance.UCI_xx
name - name of the update instance
Returns:

createEmptyUpdateCheckInstance

public UpdateCheckInstanceImpl createEmptyUpdateCheckInstance(int type,
                                                              java.lang.String name,
                                                              boolean low_noise)

createInstaller

public UpdateInstaller createInstaller()
                                throws UpdateException
Description copied from interface: UpdateManager
create a stand alone update installer. you will need to restart Azureus for it to be installed

Specified by:
createInstaller in interface UpdateManager
Returns:
Throws:
UpdateException

getInstallers

public UpdateInstaller[] getInstallers()
Description copied from interface: UpdateManager
returns the currently declared installers, if any

Specified by:
getInstallers in interface UpdateManager
Returns:

cancelled

public void cancelled(UpdateCheckInstance instance)
Specified by:
cancelled in interface UpdateCheckInstanceListener

complete

public void complete(UpdateCheckInstance instance)
Specified by:
complete in interface UpdateCheckInstanceListener

removeInstaller

protected void removeInstaller(UpdateInstaller installer)

getInstallDir

public java.lang.String getInstallDir()
Specified by:
getInstallDir in interface UpdateManager

getUserDir

public java.lang.String getUserDir()
Specified by:
getUserDir in interface UpdateManager

restart

public void restart()
             throws UpdateException
Description copied from interface: UpdateManager
restart azureus after applying any updates

Specified by:
restart in interface UpdateManager
Throws:
UpdateException

applyUpdates

public void applyUpdates(boolean restart_after)
                  throws UpdateException
Description copied from interface: UpdateManager
applies any updates and stops or restarts Azureus

Specified by:
applyUpdates in interface UpdateManager
Throws:
UpdateException

verifyData

public java.io.InputStream verifyData(Update update,
                                      java.io.InputStream is,
                                      boolean force)
                               throws UpdateException
Throws:
UpdateException

addVerificationListener

public void addVerificationListener(UpdateManagerVerificationListener l)
Specified by:
addVerificationListener in interface UpdateManager

removeVerificationListener

public void removeVerificationListener(UpdateManagerVerificationListener l)
Specified by:
removeVerificationListener in interface UpdateManager

addListener

public void addListener(UpdateManagerListener l)
Specified by:
addListener in interface UpdateManager

removeListener

public void removeListener(UpdateManagerListener l)
Specified by:
removeListener in interface UpdateManager