Package com.luciad.fusion.tilestore
Class TLfnDigestTileStore
java.lang.Object
com.luciad.fusion.tilestore.ALfnTileStore
com.luciad.fusion.tilestore.ALfnTileStoreWrapper
com.luciad.fusion.tilestore.TLfnDigestTileStore
- All Implemented Interfaces:
ILfnResourceMetadataResolver
,Closeable
,AutoCloseable
A decorating Tile Store which adds a message digest to tiles and verifies message digests upon tile retrieval.
Whenever a
getTile
request is performed on coverages in this Tile Store, the Tile Store will compute the
digest on the tile data and verify whether it corresponds to the recorded digest. If it doesn't, the error
will be reported to the InvalidMessageDigestHandler
of this Tile Store.
Whenever a putTile
request is performed on coverages in this Tile Store, and no digest is provided
externally, this Tile Store will compute the digest on the tile data and include it in the putTile request to
the wrapped Tile Store.
This Tile Store can be used to decorate any other Tile Store (LTS client Tile Stores, file system Tile Stores, ...)
with digesting functionality.
If no tile message digest algorithm is configured on the coverage metadata, this decorator has no effect.- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Error handler for reporting invalid digests on data served by this Tile Store.Nested classes/interfaces inherited from class com.luciad.fusion.tilestore.ALfnTileStore
ALfnTileStore.CommitPolicy, ALfnTileStore.ReadResult, ALfnTileStore.Result, ALfnTileStore.WriteResult
-
Field Summary
Fields inherited from class com.luciad.fusion.tilestore.ALfnTileStoreWrapper
fDelegate
-
Constructor Summary
ConstructorDescriptionTLfnDigestTileStore
(ALfnTileStore aDelegate, boolean aOmitCorruptTiles, TLfnDigestTileStore.InvalidMessageDigestHandler aCorruptTileHandler) Creates a new digest Tile Store as a decorator around the specified Tile Store. -
Method Summary
Methods inherited from class com.luciad.fusion.tilestore.ALfnTileStoreWrapper
close, deleteResource, deleteUserData, getAsset, getCapabilities, getCoverageIds, getMetadata, getRasterAssetMetadata, getRasterCoverageMetadata, getResourceMetadata, getTheme, getThemeMetadata, getURI, getUserData, getVectorAssetMetadata, getVectorCoverageMetadata, putMetadata, putRasterAssetMetadata, putRasterCoverageMetadata, putResourceMetadata, putThemeMetadata, putUserData, putVectorAssetMetadata, putVectorCoverageMetadata, query, query, toString
-
Constructor Details
-
TLfnDigestTileStore
public TLfnDigestTileStore(ALfnTileStore aDelegate, boolean aOmitCorruptTiles, TLfnDigestTileStore.InvalidMessageDigestHandler aCorruptTileHandler) Creates a new digest Tile Store as a decorator around the specified Tile Store.- Parameters:
aDelegate
- the Tile Store to be decorated with message digestingaOmitCorruptTiles
- iftrue
, tiles with invalid digests will not be passed onto the getTile handlers, iffalse
, all tiles will be passed onto the getTile handlers, whether the digest matches or not.aCorruptTileHandler
- the handler to which invalid message digests should be reported, must never benull
-
-
Method Details
-
getCoverage
Description copied from class:ALfnTileStore
Gets a coverage from the Tile Store. Coverage IDs can be found using either:ALfnTileStore.getCoverageIds()
ALfnTileStore.query(ILfnQueryHandler, TLfnQuery)
and get the ID from the metadata
- Overrides:
getCoverage
in classALfnTileStoreWrapper
- Parameters:
aID
- the ID of the desired coverage- Returns:
- the coverage or
null
if it does not exist - Throws:
IOException
- in case of an I/O failureTLfnServiceException
- in case of a service processing failure- See Also:
-