Class ALfnTileStoreProvider

java.lang.Object
com.luciad.fusion.tilestore.ALfnTileStoreProvider
Direct Known Subclasses:
TLfnTileStoreProvider

public abstract class ALfnTileStoreProvider extends Object

A provider that can provide a Tile Store based on a URI.

The contract of getTileStore(URI) is that callers of this method are responsible for closing the returned tile store instance. Implementations of this class should take this into account. Implementations can choose to:

  • Create new instances. In that case, they transfer the ownership of the created tile store to the caller, and assume it will close the tile store.
  • Return an existing instance. In this case, the lifetime of the returned tile store is most likely longer than the scope in which the tile store is used. This means that the tile store provider needs to prevent the returned tile store is actually closed. It can do so for example by returning a tile store wrapper that does nothing in its close method.

It is advised not to create and cache tile store instances in a tile store provider. Doing so makes it unclear when a tile store instance must be disposed.

Since:
2013.0
  • Constructor Details

    • ALfnTileStoreProvider

      public ALfnTileStoreProvider()
  • Method Details

    • getTileStore

      public abstract ALfnTileStore getTileStore(URI aUri) throws IOException, TLfnServiceException

      Returns a Tile Store for the given URI.

      Caller code must always close the returned tile store instance after using it. See class doc for more information.

      Parameters:
      aUri - The URI to create the Tile Store for
      Returns:
      The Tile Store
      Throws:
      IOException - if the Tile Store cannot be opened because of unexpected IO reasons
      TLfnServiceException - if the Tile Store cannot be opened because of unexpected reasons