public abstract class AbstractTileSourceProvider<T> extends java.lang.Object implements TileSourceProvider<T>
Abstract slice source
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
connected |
protected java.util.concurrent.locks.ReentrantLock |
lock |
Constructor and Description |
---|
AbstractTileSourceProvider() |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTileset, getTilesets, refresh
protected java.util.concurrent.locks.ReentrantLock lock
protected java.util.concurrent.atomic.AtomicBoolean connected
protected abstract boolean doConnect(T tilesourceInfo)
protected abstract Tileset doCreateTileset(MetaData metaData)
protected abstract boolean doDisConnect()
public boolean connect(T tilesourceInfo)
Connects the slice source.
connect
in interface TileSourceProvider<T>
tilesourceInfo
-public boolean disConnect()
Disconnect.
disConnect
in interface TileSourceProvider<T>
tilesourceInfo
-public void setTilesourceInfo(T tilesourceInfo)
Sets slice source connection information
tilesourceInfo
-public T getTilesourceInfo()
Returns slice source connection information
tilesourceInfo
-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
getTileset
in interface TileSourceProvider<T>
metaData
-createIfNotExist
-public boolean isConnected()
Whether the slice source has been properly connected.
isConnected
in interface TileSourceProvider<T>
protected Tileset getCompatibleTileset(MetaData metaData)
metaData
-public void addAvailableListener(RemoteTileSourceAvailableListener listener)
addAvailableListener
in interface TileSourceProvider<T>
public void removeAvailableListener(RemoteTileSourceAvailableListener listener)
removeAvailableListener
in interface TileSourceProvider<T>