Class ALfnClientEnvironment

java.lang.Object
com.luciad.fusion.client.ALfnClientEnvironment

public abstract class ALfnClientEnvironment extends Object
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 Details

    • ALfnClientEnvironment

      public ALfnClientEnvironment()
  • Method Details

    • newInstance

      public static ALfnClientEnvironment newInstance(ALfnEnvironment aEnvironment)
      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

      public abstract ALfnEnvironment getEnvironment()
      Returns the core environment.
      Returns:
      the core environment used by this client environment.
    • configureDataModel

      public abstract void configureDataModel(TLcdDataModel aDataModel)
      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 named Net/Get-i/n where i is their index in the pool (offset by 1) and n 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 named Net/Put-i/n where i is their index in the pool (offset by 1) and n 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

      public abstract void close() throws IOException, InterruptedException
      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 on finalize(). 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 failure
      InterruptedException - when the closing is interrupted