com.supermap.services.tilesource.impl

Class AbstractTileSourceProvider<T>

  • java.lang.Object
    • com.supermap.services.tilesource.impl.AbstractTileSourceProvider<T>
  • All Implemented Interfaces:
    TileSourceProvider<T>


    public abstract class AbstractTileSourceProvider<T>
    extends java.lang.Object
    implements TileSourceProvider<T>
    

    Abstract slice source

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected java.util.concurrent.atomic.AtomicBoolean connected 
      protected java.util.concurrent.locks.ReentrantLock lock 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addAvailableListener(RemoteTileSourceAvailableListener listener) 
      boolean connect(T tilesourceInfo)
      Connects the slice source.
      boolean disConnect()
      Disconnect.
      protected abstract boolean doConnect(T tilesourceInfo) 
      protected abstract Tileset doCreateTileset(MetaData metaData) 
      protected abstract boolean doDisConnect() 
      protected Tileset getCompatibleTileset(MetaData metaData)
      Determines if there is a slice set that is compatible with the current meta information
      Tileset<?,?> getTileset(MetaData metaData, boolean createIfNotExist)
      Returns a matching slice set that dynamically creates a slice set when the specified slice set does not exist and createIfNotExist is true
      T getTilesourceInfo()
      Returns slice source connection information
      boolean isConnected()
      Whether the slice source has been properly connected.
      void removeAvailableListener(RemoteTileSourceAvailableListener listener) 
      void setTilesourceInfo(T tilesourceInfo)
      Sets slice source connection information
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • lock

        protected java.util.concurrent.locks.ReentrantLock lock
        
      • connected

        protected java.util.concurrent.atomic.AtomicBoolean connected
        
    • Constructor Detail

      • AbstractTileSourceProvider

        public AbstractTileSourceProvider()
        
    • Method Detail

      • doConnect

        protected abstract boolean doConnect(T tilesourceInfo)
        
      • doCreateTileset

        protected abstract Tileset doCreateTileset(MetaData metaData)
        
      • doDisConnect

        protected abstract boolean doDisConnect()
        
      • connect

        public boolean connect(T tilesourceInfo)
        

        Connects the slice source.

        Specified by:
        connect in interface TileSourceProvider<T>
        Parameters:
        tilesourceInfo -
        Returns:
        Since:
        7.0
      • disConnect

        public boolean disConnect()
        

        Disconnect.

        Specified by:
        disConnect in interface TileSourceProvider<T>
        Parameters:
        tilesourceInfo -
        Returns:
        Since:
        7.0
      • setTilesourceInfo

        public void setTilesourceInfo(T tilesourceInfo)
        

        Sets slice source connection information

        Parameters:
        tilesourceInfo -
        Since:
        7.0
      • getTilesourceInfo

        public T getTilesourceInfo()
        

        Returns slice source connection information

        Parameters:
        tilesourceInfo -
        Since:
        7.0
      • getTileset

        public Tileset<?,?> getTileset(MetaData metaData,
                              boolean createIfNotExist)
        

        Returns a matching slice set that dynamically creates a slice set when the specified slice set does not exist and createIfNotExist is true

        Specified by:
        getTileset in interface TileSourceProvider<T>
        Parameters:
        metaData -
        createIfNotExist -
        Returns:
        Since:
        7.0
      • isConnected

        public boolean isConnected()
        

        Whether the slice source has been properly connected.

        Specified by:
        isConnected in interface TileSourceProvider<T>
        Returns:
        Since:
        7.0.0
      • getCompatibleTileset

        protected Tileset getCompatibleTileset(MetaData metaData)
        
        Determines if there is a slice set that is compatible with the current meta information
        Parameters:
        metaData -