com.mmoui.manager.services
Interface UpdateController


public interface UpdateController

A control interface through which modules can send information back to the core asynchronously. This should not be implemented by modules directly, but is rather passed to UpdateService objects during their initialization

Since:
1.0.3
Version:
$Id: UpdateController.java 141 2009-02-20 00:05:12Z mpdelbuono $
Author:
Matthew P. Del Buono
See Also:
UpdateService.initialize(com.mmoui.manager.services.UpdateController)

Method Summary
 ModuleLogger getLog()
          Gets a ModuleLogger object which can be used by the module to log information to the global log
 void insertUpdatable(Updatable updatable)
          Asynchronously inserts an updatable into the list to be handled.
 void reset(Updatable updatable)
          Requests a reset of this Updatable or module.
 

Method Detail

getLog

ModuleLogger getLog()
Gets a ModuleLogger object which can be used by the module to log information to the global log

Returns:
the ModuleLogger object with which to log information
See Also:
ModuleLogger

reset

void reset(Updatable updatable)

Requests a reset of this Updatable or module. This will trigger an interrupt on the specified Updatable object, followed by a cleanup, and then the Updatable's update process will be restarted. This is useful for when the Updatable's information has been significantly changed and needs to refresh or restart its update process.

If the Updatable specified is null, then the entire module will be re-initialized. All Updatable objects will be shut down in the manner previously described, then the module will restart its process starting with initialize(), enumerateItems(), and then proceed as per normal

Parameters:
updatable - the Updatable object which should be reset, or null if the entire module should be reset

insertUpdatable

void insertUpdatable(Updatable updatable)
Asynchronously inserts an updatable into the list to be handled. This should never be called before the module has already listed its options with enumerateItems() and is designed for single insertion only for exceptional cases where a new addon is identified during user interaction.

Parameters:
updatable - the Updatable object which should be inserted into the update queue