|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.TimerTask
gov.nasa.worldwindx.examples.util.BalloonController.DocumentRetrievalTask
protected class BalloonController.DocumentRetrievalTask
A TimerTask that will request a resource from the FileStore until it becomes
available, or until a timeout is exceeded. When the task finishes it will trigger a callback on the Event
Dispatch Thread (EDT) to either onDocumentLoaded or onDocumentFailed.
| Field Summary | |
|---|---|
protected KMLRoot |
context
The document that contained the link this document. |
protected String |
docUrl
URL of the KML document to load. |
protected String |
featureRef
Reference to a feature in the remote document, with an action (for example, "myFeature;flyto"). |
protected long |
start
Time that the task started, used to evaluate the timeout. |
protected long |
timeout
Task timeout. |
| Constructor Summary | |
|---|---|
BalloonController.DocumentRetrievalTask(String url,
KMLRoot context,
String featureRef,
long timeout)
Create a new retrieval task. |
|
| Method Summary | |
|---|---|
void |
run()
Request the document from the FileStore. |
| Methods inherited from class java.util.TimerTask |
|---|
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected KMLRoot context
protected String docUrl
protected String featureRef
protected long start
protected long timeout
| Constructor Detail |
|---|
public BalloonController.DocumentRetrievalTask(String url,
KMLRoot context,
String featureRef,
long timeout)
url - URL of document to retrieve.context - Context of the link to the document. May be null.featureRef - Reference to a feature in the remote document, with an action to perform on the feature
(for example, "myFeature;flyto"). The action will be carried out when the document becomes
available.timeout - Timeout for this task in milliseconds. The task will fail if the document has not been
downloaded in this many milliseconds.| Method Detail |
|---|
public void run()
FileStore. If the document is available, parse
it and schedule a callback on the EDT to BalloonController.onDocumentLoaded(String,
gov.nasa.worldwind.ogc.kml.KMLRoot, String). If an exception occurs, or the timeout is exceeded, schedule a
callback on the EDT to BalloonController.onDocumentFailed(String, Exception)
run in interface Runnablerun in class TimerTask
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||