Package com.luciad.fusion.client
Class ALfnClientEnvironment
java.lang.Object
com.luciad.fusion.client.ALfnClientEnvironment
An opaque handle to the execution environment for LuciadFusion clients.
The handle will be interpreted by LuciadFusion and should be closed
by the application once all LuciadFusion processing is finished.
The client environment also allows configuration of the execution environment. Specifically, an XML data model can be added to support extension schemas (ISO 19115 metadata) on the clients.
- Since:
- 10.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Closes this client environment and releases all its resources.abstract void
configureDataModel
(TLcdDataModel aDataModel) Configures an additional data model on the XML encoder and decoder.abstract ALfnEnvironment
Returns the core environment.abstract int
Gets the number of threads used for getting tiles.abstract int
Gets the number of threads used for putting tiles.static ALfnClientEnvironment
newInstance
(ALfnEnvironment aEnvironment) Creates a new client environment.abstract void
setGetTileThreadCount
(int aThreadCount) Sets the number of threads for getting tiles.abstract void
setPutTileThreadCount
(int aThreadCount) Sets the number of threads for putting tiles.
-
Constructor Details
-
ALfnClientEnvironment
public ALfnClientEnvironment()
-
-
Method Details
-
newInstance
Creates a new client environment. A single client environment should be created. The environment should be closed when no longer in use.- Parameters:
aEnvironment
- the core environment
-
getEnvironment
Returns the core environment.- Returns:
- the core environment used by this client environment.
-
configureDataModel
Configures an additional data model on the XML encoder and decoder. The additional model can support a custom XML schema, for instance an extension schema for ISO 19115 metadata.- Parameters:
aDataModel
- a data model to be added
-
getGetTileThreadCount
public abstract int getGetTileThreadCount()Gets the number of threads used for getting tiles. The thread pool is shared by all clients. These threads are namedNet/Get-i/n
wherei
is their index in the pool (offset by 1) andn
is the pool size. The default value is 16 threads.- Returns:
- the thread count
-
setGetTileThreadCount
public abstract void setGetTileThreadCount(int aThreadCount) Sets the number of threads for getting tiles.- Parameters:
aThreadCount
- the new thread count- See Also:
-
getPutTileThreadCount
public abstract int getPutTileThreadCount()Gets the number of threads used for putting tiles. The thread pool is shared by all clients. These threads are namedNet/Put-i/n
wherei
is their index in the pool (offset by 1) andn
is the pool size. The default value is 16 threads.- Returns:
- the thread count
-
setPutTileThreadCount
public abstract void setPutTileThreadCount(int aThreadCount) Sets the number of threads for putting tiles.- Parameters:
aThreadCount
- the new thread count- See Also:
-
close
Closes this client environment and releases all its resources. The resources may include caches, thread pools, file system coverages, etc. This call may block if resources are still in use. Note that this does not close the core environment. If not closed explicitly, the client environment will automatically be closed onfinalize()
. This may happen at an undetermined time in the future, if at all. If you have time-dependent code that relies on the client environment being closed at a specific point in time, you should explicitly close it. Closing the client environment multiple times does not throw and has the same effect as closing it once.- Throws:
IOException
- in case of an I/O failureInterruptedException
- when the closing is interrupted
-