anon.infoservice.update
Class InfoServiceUpdater

java.lang.Object
  extended by anon.util.Updater
      extended by anon.infoservice.update.AbstractDatabaseUpdater
          extended by anon.infoservice.update.InfoServiceUpdater
All Implemented Interfaces:
java.util.Observer

public class InfoServiceUpdater
extends AbstractDatabaseUpdater

Updates the known InfoServices. This may be done automatically (by a background thread) and manually by method call. The automatic update is only done if this is allowed by the model.

Author:
Rolf Wendolsky

Nested Class Summary
 
Nested classes/interfaces inherited from class anon.util.Updater
Updater.ConstantUpdateInterval, Updater.DynamicUpdateInterval, Updater.IUpdateInterval, Updater.ObservableInfo
 
Field Summary
private static long UPDATE_INTERVAL_MS
           
 
Fields inherited from class anon.infoservice.update.AbstractDatabaseUpdater
KEEP_ENTRY_FACTOR
 
Constructor Summary
InfoServiceUpdater(Updater.ObservableInfo a_observableInfo)
           
 
Method Summary
protected  java.util.Hashtable getEntrySerials()
           
protected  AbstractDatabaseEntry getPreferredEntry()
           
 java.lang.Class getUpdatedClass()
           
protected  java.util.Hashtable getUpdatedEntries(java.util.Hashtable a_entriesToUpdate)
           
protected  void setPreferredEntry(AbstractDatabaseEntry a_preferredEntry)
           
protected  void updateInternal()
          Does the update.
 
Methods inherited from class anon.infoservice.update.AbstractDatabaseUpdater
doCleanup, isFirstUpdateDone, protectFromCleanup, wasUpdateSuccessful
 
Methods inherited from class anon.util.Updater
getObservableInfo, getUpdatedClassName, getUpdateInterval, isUpdatePaused, start, stop, update, update, updateAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UPDATE_INTERVAL_MS

private static final long UPDATE_INTERVAL_MS
See Also:
Constant Field Values
Constructor Detail

InfoServiceUpdater

public InfoServiceUpdater(Updater.ObservableInfo a_observableInfo)
Method Detail

getUpdatedClass

public java.lang.Class getUpdatedClass()
Specified by:
getUpdatedClass in class Updater

getPreferredEntry

protected AbstractDatabaseEntry getPreferredEntry()
Overrides:
getPreferredEntry in class AbstractDatabaseUpdater

setPreferredEntry

protected void setPreferredEntry(AbstractDatabaseEntry a_preferredEntry)
Overrides:
setPreferredEntry in class AbstractDatabaseUpdater

updateInternal

protected void updateInternal()
Description copied from class: AbstractDatabaseUpdater
Does the update. Subclasses may overwrite to, for example, synchronize the update with another object.

Overrides:
updateInternal in class AbstractDatabaseUpdater

getEntrySerials

protected java.util.Hashtable getEntrySerials()
Specified by:
getEntrySerials in class AbstractDatabaseUpdater

getUpdatedEntries

protected java.util.Hashtable getUpdatedEntries(java.util.Hashtable a_entriesToUpdate)
Specified by:
getUpdatedEntries in class AbstractDatabaseUpdater