NASA World Wind

gov.nasa.worldwind.terrain
Class BasicElevationModel.ResourceRetrievalTask

java.lang.Object
  extended by gov.nasa.worldwind.terrain.BasicElevationModel.ResourceRetrievalTask
All Implemented Interfaces:
Runnable
Enclosing class:
BasicElevationModel

protected static class BasicElevationModel.ResourceRetrievalTask
extends Object
implements Runnable

ResourceRetrievalTask retrieves any non-tile resources associated with this ElevationModel in it's run method.


Field Summary
protected  BasicElevationModel em
           
 
Constructor Summary
BasicElevationModel.ResourceRetrievalTask(BasicElevationModel em)
          Constructs a new ResourceRetrievalTask, but otherwise does nothing.
 
Method Summary
 BasicElevationModel getElevationModel()
          Returns the elevation model who's non-tile resources are retrieved by this ResourceRetrievalTask
protected  void handleUncaughtException(Throwable t)
          Logs a message describing the uncaught exception thrown during a call to run, and cancels any pending retrieval tasks.
protected  void retrieveResources()
          Invokes BasicElevationModel.retrieveResources(), and cancels any pending retrieval tasks if the call returns AVKey.RETRIEVAL_STATE_SUCCESSFUL.
 void run()
          Retrieves any non-tile resources associated with the specified ElevationModel, and cancels any pending retrieval tasks if the retrieval succeeds, or if an exception is thrown during retrieval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

em

protected BasicElevationModel em
Constructor Detail

BasicElevationModel.ResourceRetrievalTask

public BasicElevationModel.ResourceRetrievalTask(BasicElevationModel em)
Constructs a new ResourceRetrievalTask, but otherwise does nothing.

Parameters:
em - the BasicElevationModel who's non-tile resources should be retrieved in the run method.
Throws:
IllegalArgumentException - if the elevation model is null.
Method Detail

getElevationModel

public BasicElevationModel getElevationModel()
Returns the elevation model who's non-tile resources are retrieved by this ResourceRetrievalTask

Returns:
the elevation model who's non-tile resources are retireved.

handleUncaughtException

protected void handleUncaughtException(Throwable t)
Logs a message describing the uncaught exception thrown during a call to run, and cancels any pending retrieval tasks.

Parameters:
t - the uncaught exception.

retrieveResources

protected void retrieveResources()
Invokes BasicElevationModel.retrieveResources(), and cancels any pending retrieval tasks if the call returns AVKey.RETRIEVAL_STATE_SUCCESSFUL.


run

public void run()
Retrieves any non-tile resources associated with the specified ElevationModel, and cancels any pending retrieval tasks if the retrieval succeeds, or if an exception is thrown during retrieval.

Specified by:
run in interface Runnable

NASA World Wind