edu.sc.seis.fissuresUtil.chooser
Class UpdateCheckerJob

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.cache.AbstractJob
      extended by edu.sc.seis.fissuresUtil.chooser.UpdateCheckerJob
All Implemented Interfaces:
Job, java.lang.Runnable

public class UpdateCheckerJob
extends AbstractJob


Field Summary
protected  boolean forceCheck
           
protected  edu.iris.Fissures.model.TimeInterval FORTNIGHT
           
protected  boolean isGui
           
protected  edu.iris.Fissures.model.TimeInterval MONTH
           
protected  java.util.prefs.Preferences prefs
           
protected  java.lang.String prefsName
           
protected  java.lang.String programName
           
protected  boolean showNoUpdate
           
protected  edu.iris.Fissures.model.TimeInterval SIX_HOUR
           
protected  java.lang.String updateURL
           
protected  boolean usePrefs
           
protected  java.lang.String version
           
 
Fields inherited from interface edu.sc.seis.fissuresUtil.cache.Job
FINISHED, INITIALIZE
 
Constructor Summary
UpdateCheckerJob(java.lang.String displayName, java.lang.String programName, java.lang.String version, java.lang.String updateURL, boolean gui, boolean forceCheck)
           
 
Method Summary
protected  edu.iris.Fissures.model.MicroSecondDate getNextCheck()
           
protected  java.util.prefs.Preferences getPrefs()
           
protected  void handleUpdateGUI(com.isti.util.updatechecker.LocationUpdate locationUpdate)
           
protected  void handleUpdateNonGUI(com.isti.util.updatechecker.LocationUpdate locationUpdate)
           
 void runJob()
          run acts like the run method of Runnable, but is wrapped by the Job system so that any exceptions are caught and the job is set to finished.
protected  void setNextCheck(edu.iris.Fissures.model.MicroSecondDate date)
           
 void setUsePreferencesForStorage(boolean usePrefs)
           
 
Methods inherited from class edu.sc.seis.fissuresUtil.cache.AbstractJob
add, getName, getStatus, isFinished, run, setFinished, setFinished, setStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIX_HOUR

protected final edu.iris.Fissures.model.TimeInterval SIX_HOUR

FORTNIGHT

protected final edu.iris.Fissures.model.TimeInterval FORTNIGHT

MONTH

protected final edu.iris.Fissures.model.TimeInterval MONTH

prefsName

protected java.lang.String prefsName

version

protected java.lang.String version

programName

protected java.lang.String programName

forceCheck

protected boolean forceCheck

showNoUpdate

protected boolean showNoUpdate

isGui

protected boolean isGui

updateURL

protected java.lang.String updateURL

prefs

protected java.util.prefs.Preferences prefs

usePrefs

protected boolean usePrefs
Constructor Detail

UpdateCheckerJob

public UpdateCheckerJob(java.lang.String displayName,
                        java.lang.String programName,
                        java.lang.String version,
                        java.lang.String updateURL,
                        boolean gui,
                        boolean forceCheck)
Parameters:
forceCheck - overides the users "don't bother me until..." setting in the Java Preferences. Usually this should be false, but is useful for testing.
Method Detail

setUsePreferencesForStorage

public void setUsePreferencesForStorage(boolean usePrefs)

runJob

public void runJob()
Description copied from interface: Job
run acts like the run method of Runnable, but is wrapped by the Job system so that any exceptions are caught and the job is set to finished. This prevents the "flashing forever" case seen often in GEE.


handleUpdateGUI

protected void handleUpdateGUI(com.isti.util.updatechecker.LocationUpdate locationUpdate)
                        throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException

handleUpdateNonGUI

protected void handleUpdateNonGUI(com.isti.util.updatechecker.LocationUpdate locationUpdate)
                           throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException

getNextCheck

protected edu.iris.Fissures.model.MicroSecondDate getNextCheck()

setNextCheck

protected void setNextCheck(edu.iris.Fissures.model.MicroSecondDate date)
                     throws java.util.prefs.BackingStoreException
Throws:
java.util.prefs.BackingStoreException

getPrefs

protected java.util.prefs.Preferences getPrefs()