bulkretrievalthread.java
来自「world wind java sdk 源码」· Java 代码 · 共 85 行
JAVA
85 行
package gov.nasa.worldwind.retrieve;
import gov.nasa.worldwind.geom.Sector;
import gov.nasa.worldwind.util.Logging;
/**
* Retrieves data for a {@link BulkRetrievable}.
*
* @author Patrick Murris
* @version $Id: BulkRetrievalThread.java 10192 2009-04-14 21:12:31Z patrickmurris $
*/
public abstract class BulkRetrievalThread extends Thread
{
protected int RETRIEVAL_SERVICE_POLL_DELAY = 10000; // 10 sec
protected final BulkRetrievable retrievable;
protected final Sector sector;
protected final double resolution;
protected final Progress progress;
public BulkRetrievalThread(BulkRetrievable retrievable, Sector sector, double resolution)
{
if (retrievable == null)
{
String msg = Logging.getMessage("nullValue.RetrievableIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
if (sector == null)
{
String msg = Logging.getMessage("nullValue.SectorIsNull");
Logging.logger().severe(msg);
throw new IllegalArgumentException(msg);
}
this.retrievable = retrievable;
this.sector = sector;
this.resolution = resolution;
this.progress = new Progress();
}
public abstract void run();
/**
* Get the {@link BulkRetrievable} instance for which this thread acts.
*
* @return the {@link BulkRetrievable} instance.
*/
public BulkRetrievable getRetrievable()
{
return this.retrievable;
}
/**
* Get the requested {@link Sector}.
*
* @return the requested {@link Sector}.
*/
public Sector getSector()
{
return this.sector;
}
/**
* Get the requested resolution.
*
* @return the requested resolution.
*/
public double getResolution()
{
return this.resolution;
}
/**
* Get a {@link Progress} instance providing information about this task progress.
*
* @return a {@link Progress} instance providing information about this task progress.
*/
public Progress getProgress()
{
return this.progress;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?