Class PlaceNameLayer.DownloadPostProcessor
- java.lang.Object
-
- gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
-
- gov.nasa.worldwind.layers.placename.PlaceNameLayer.DownloadPostProcessor
-
- All Implemented Interfaces:
RetrievalPostProcessor
- Direct Known Subclasses:
PlaceNameLayerBulkDownloader.BulkDownloadPostProcessor
- Enclosing class:
- PlaceNameLayer
protected static class PlaceNameLayer.DownloadPostProcessor extends AbstractRetrievalPostProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected FileStore
fileStore
protected PlaceNameLayer
layer
protected PlaceNameLayer.Tile
tile
-
Fields inherited from class gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
avList, retriever
-
-
Constructor Summary
Constructors Constructor Description DownloadPostProcessor(PlaceNameLayer layer, PlaceNameLayer.Tile tile)
DownloadPostProcessor(PlaceNameLayer layer, PlaceNameLayer.Tile tile, FileStore fileStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.io.File
doGetOutputFile()
Abstract method that subclasses must provide to identify the output file for the post-processor's retrieval content.protected java.lang.Object
getFileLock()
Returns an object that can be used to synchronize writing to the output file.protected FileStore
getFileStore()
protected java.nio.ByteBuffer
handleSuccessfulRetrieval()
Process the retrieved data if it has been retrieved successfully.protected java.nio.ByteBuffer
handleXMLContent()
Handles XML content.protected void
markResourceAbsent()
Marks the retrieval target absent.-
Methods inherited from class gov.nasa.worldwind.retrieve.AbstractRetrievalPostProcessor
convertToDDS, getOutputFile, getRetriever, handleApplicationContent, handleContent, handleContentException, handleHTMLContent, handleImageContent, handleInvalidResponseCode, handleTextContent, handleUnknownContentType, handleUnsuccessfulRetrieval, handleWMSExceptionContent, handleZipContent, isDeleteOnExit, isPrimaryContentType, isWMSException, logTextBuffer, overwriteExistingFile, run, saveBuffer, saveBuffer, saveDDS, transformPixels, validateHTTPResponseCode, validateJarResponseCode, validateResponseCode
-
-
-
-
Field Detail
-
layer
protected final PlaceNameLayer layer
-
tile
protected final PlaceNameLayer.Tile tile
-
fileStore
protected final FileStore fileStore
-
-
Constructor Detail
-
DownloadPostProcessor
public DownloadPostProcessor(PlaceNameLayer layer, PlaceNameLayer.Tile tile)
-
DownloadPostProcessor
public DownloadPostProcessor(PlaceNameLayer layer, PlaceNameLayer.Tile tile, FileStore fileStore)
-
-
Method Detail
-
getFileStore
protected FileStore getFileStore()
-
markResourceAbsent
protected void markResourceAbsent()
Description copied from class:AbstractRetrievalPostProcessor
Marks the retrieval target absent. Subclasses should override this method if they keep track of absent-resources. The default implementation does nothing.- Overrides:
markResourceAbsent
in classAbstractRetrievalPostProcessor
-
getFileLock
protected java.lang.Object getFileLock()
Description copied from class:AbstractRetrievalPostProcessor
Returns an object that can be used to synchronize writing to the output file. Superclasses should override this method and return the object used as a lock by other objects that read or otherwise interact with the output file.- Overrides:
getFileLock
in classAbstractRetrievalPostProcessor
- Returns:
- an object to use for read/write synchronization, or null if no lock is needed.
-
doGetOutputFile
protected java.io.File doGetOutputFile()
Description copied from class:AbstractRetrievalPostProcessor
Abstract method that subclasses must provide to identify the output file for the post-processor's retrieval content.- Specified by:
doGetOutputFile
in classAbstractRetrievalPostProcessor
- Returns:
- the output file.
-
handleSuccessfulRetrieval
protected java.nio.ByteBuffer handleSuccessfulRetrieval()
Description copied from class:AbstractRetrievalPostProcessor
Process the retrieved data if it has been retrieved successfully.- Overrides:
handleSuccessfulRetrieval
in classAbstractRetrievalPostProcessor
- Returns:
- a buffer containing the downloaded data, perhaps converted during content handling.
-
handleXMLContent
protected java.nio.ByteBuffer handleXMLContent() throws java.io.IOException
Description copied from class:AbstractRetrievalPostProcessor
Handles XML content. The default implementation only callsAbstractRetrievalPostProcessor.logTextBuffer(java.nio.ByteBuffer)
and returns.- Overrides:
handleXMLContent
in classAbstractRetrievalPostProcessor
- Returns:
- a buffer containing the retrieved XML.
- Throws:
java.io.IOException
- if an IO error occurs while processing the data.
-
-