public class TLfnLFSEngineFactory extends TLfnEngineFactory
A factory class for ALfnEngine
instances which perform the fusion on a remote system accessible through the LFS protocol.
Engines can be created using the createEngine(com.luciad.fusion.tilestore.ALfnTileStore, String)
method.
The target Tile Store should be a remote one, accessible through the LTS protocol.
You should reuse the same instance for the same server as much as possible to reduce polling calls to the server.
TLfnEngineFactory
TLfnEngineFactory.RasterSessionBuilder, TLfnEngineFactory.TileCombiningStrategy, TLfnEngineFactory.VectorSessionBuilder
ALL_LEVELS
Constructor and Description |
---|
TLfnLFSEngineFactory(URI aUri,
ALfnEngineEnvironment aEnvironment,
ALfnTileStoreProvider aTileStoreProvider,
ILcdTransport aTransport)
Creates a new engine factory that proxies for the given URI.
|
Modifier and Type | Method and Description |
---|---|
ALfnEngine |
createEngine(ALfnTileStore aTileStore,
ILfnEngineSession aSession)
This method is not supported for remote LFS engines.
|
ALfnEngine |
createEngine(ALfnTileStore aTileStore,
String aCoverageID)
Creates a remote engine for a given coverage ID targeting a given Tile Store.
|
TLfnLTSCapabilities |
getCapabilities()
Gets the LFS capabilities of the remote fusion server.
|
Collection<ALfnEngine> |
getEngines()
Gets the open engines managed by this instance.
|
URI |
getUri()
Returns the URI this engine factory is for.
|
boolean |
removeEngine(ALfnEngine aEngine)
Removes an open engine.
|
newRasterSessionBuilder, newVectorSessionBuilder
public TLfnLFSEngineFactory(URI aUri, ALfnEngineEnvironment aEnvironment, ALfnTileStoreProvider aTileStoreProvider, ILcdTransport aTransport) throws IOException, TLfnServiceException
This constructor already tries to contact the server.
aUri
- a URI to connect to. Typically this URI has the "http"
scheme, for example "http://localhost:8080/LuciadFusion/lfs"
.aEnvironment
- an engine environment, providing the shared resources for the new instanceaTileStoreProvider
- a Tile Store provider, necessary to obtain Tile Stores associated with remote engines
.aTransport
- a transport to be used. You can create and share a transport using TLfnClientFactory
.IOException
- when there was a problem connecting to the URITLfnServiceException
- when there was a problem connecting to the URIIllegalArgumentException
- when one of the arguments is invalid, for example with the URI has no schemepublic URI getUri()
public TLfnLTSCapabilities getCapabilities() throws IOException, TLfnServiceException
"FuseCoverage"
, ...), and how they can be accessed
("GET"
, "POST"
). The structure of the capabilities is exactly the same as for
the LTS capabilities, which is why the TLfnLTSCapabilities
class is reused.IOException
- on I/O failureTLfnServiceException
- on service processing failurepublic ALfnEngine createEngine(ALfnTileStore aTileStore, ILfnEngineSession aSession) throws IOException, TLfnServiceException
This method is not supported for remote LFS engines.
It will throw UnsupportedOperationException
.
Use createEngine(com.luciad.fusion.tilestore.ALfnTileStore, String)
instead.
IllegalArgumentException
upon violation.
The constraints are:
null
"INCOMPLETE"
.
In other words, it is not allowed to add additional assets to an existing coverage as long as that coverage has not yet been fully fusedcreateEngine
in class TLfnEngineFactory
aTileStore
- the LuciadFusion Tile Store that will host the coverageaSession
- the session information for the fusionIOException
- if a connection could not be made to the engineTLfnServiceException
- if a failure happens on the remote enginepublic ALfnEngine createEngine(ALfnTileStore aTileStore, String aCoverageID) throws IOException, TLfnServiceException
Creates a remote engine for a given coverage ID targeting a given Tile Store. The Tile Store should be a remote one.
The target coverage and all of the source assets must exists in the Tile Store.
Creation of an engine will validate a number of constraints, throwing an IllegalArgumentException
upon violation.
The constraints are:
null
The engine will fuse the assets linked in the coverage, to a coverage in a remote Tile Store.
The fusion engine requires Java 1.6 for optimal performance.
You can only create an engine for the given coverage once. If an engine already exists, you will get an error.
createEngine
in class TLfnEngineFactory
aTileStore
- the LuciadFusion Tile Store that will host the coverageaCoverageID
- the id of the coverage to fuse, must exist in the Tile StoreIOException
- if a connection could not be made to the engineTLfnServiceException
- if a failure happens on the remote engineIllegalArgumentException
- in case the session is inconsistent in some wayIllegalStateException
- if an engine for the given coverage already existspublic boolean removeEngine(ALfnEngine aEngine) throws IOException, TLfnServiceException
TLfnEngineFactory
removeEngine
in class TLfnEngineFactory
aEngine
- An engine, managed by this instance.true
if the engine existed, false otherwise.IOException
- if a connection could not be made to the engineTLfnServiceException
- if a failure happens on the remote engineTLfnEngineFactory.createEngine(com.luciad.fusion.tilestore.ALfnTileStore, com.luciad.fusion.engine.ILfnEngineSession)
public Collection<ALfnEngine> getEngines() throws IOException, TLfnServiceException
TLfnEngineFactory
getEngines
in class TLfnEngineFactory
IOException
TLfnServiceException
TLfnEngineFactory.removeEngine(com.luciad.fusion.engine.ALfnEngine)