|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAoInitialize
Provides access to members that initialize licensing for ArcGIS Desktop, Engine, and Server.
The IAoInitialize Interface is the starting point for developers to initialize each application with a suitable license(s) in order for it to run successfully on any machine it is deployed on to. License configuration must be undertaken at application start time, before any ArcObjects are accessed. Failure to do so will result in application errors.
Method Summary | |
---|---|
int |
checkInExtension(int extensionCode)
Check in an extension. |
int |
checkOutExtension(int extensionCode)
Check out an extension. |
int |
initialize(int productCode)
This must be called before any other ArcObjects are created to initialize product Code. |
int |
initializedProduct()
Retrieve's the product code at which the application has been initialized. |
boolean |
isExtensionCheckedOut(int extensionCode)
Is the Extension checked out. |
int |
isExtensionCodeAvailable(int productCode,
int extensionCode)
Check if the Product Code is available and then the Extension Code for that product. |
int |
isProductCodeAvailable(int productCode)
Check if the Product Code is available. |
void |
shutdown()
Shutdown method. |
Method Detail |
---|
int isProductCodeAvailable(int productCode) throws IOException, AutomationException
The IsProductCodeAvailable method returns whether the specified license is available. If the license is available it can be used to Initialize the application.
If the product you require is not available you may want to check whether a higher product license is available to Initialize the application with. If the license you require is available using Engine Single Use then we recommend you use it in preference to the Desktop Concurrent and Desktop Single Use licenses. This means you will not limit the Desktop Concurrent licenses available to any other users. If there are no appropriate product licenses available the application should inform the user of the issue, and either allow the user to resolve the issue or exit the application.
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int isExtensionCodeAvailable(int productCode, int extensionCode) throws IOException, AutomationException
The IsExtensionCodeAvailable method returns whether the specified extension license is available with the specified product license that will be used to Initialize the application (not every extension license is available with every product license). The method firstly checks the availability of the product license and secondly checks the availability of the extension license with the product license.
When an application is initialized with a particular product license, a connection is made to a license server. All subsequent calls to the CheckOutExtension and CheckInExtension methods are made to the same license server. As such, you cannot use a combination of licenses from difference license servers or Engine Single Use.
If the licenses you require are available using Engine Single Use then we recommend you use it in preference to the Desktop Concurrent and Desktop Single Use licenses. This means you will not limit the Desktop Concurrent licenses available to any other users.
If an extension required by the application for it to run successfully is not available, the application should inform the user of the issue, and exit the application. If the extension functionality is not necessary for the application to function, and the extension license is unavailable, the application should disable to the user the functionality dependant upon the extension.
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int initialize(int productCode) throws IOException, AutomationException
Initializes the appliction with the specified product license. The product license determines the functionality the application will be able to access. Once the product license has been initialized it cannot be changed for the duration of the applications life, as it is not possible to re-initialize the applicaiton.
Before initializing the application use the IsProductCodeAvailable and IsExtensionCodeAvailable methods to ensure the appropriate license(s) is available to Initialize the application with. If all the licenses you require are available using Engine Single Use then we recommend you use it in preference to the Desktop Concurrent and Desktop Single Use licenses. This means you will not limit the Desktop Concurrent licenses available to any other users.
The Initialize method will fail to check out the specified product license if:
Note that loading data into the MapControl or PageLayoutControl through the property pages will automatically initialize the application with a product license. To ensure that the application is initialized with the product license specified by the Initialize method load data into the MapControl and PageLayoutControl programmatically after license initialization.
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int checkOutExtension(int extensionCode) throws IOException, AutomationException
Checks out the specified extension license. Extensions can either be checked out as and when an application requires the extension functionality, and checked in once the application has finished with the functionality; or the extension can be checked out directly after the application is initialized and checked back in before Shutdown. Use the CheckInExtension method to check extensions back in. The way that the extensions are checked in and out will depend on the type of product license passed to the Initialize method.
Using the CheckOutExtension method to check out an extension in an ArcGIS for Desktop application will not enable the user interface objects in the extension. Use the IExtension object to access the extension functionality and limit the use of the AoInitialize object to testing the availability of extension licenses and determining the extensions already checked out.
If an application using extension functionality is initialized with an Engine single use license (ArcGIS Engine or ArcGIS Engine with Enterprise GeoDatabase) the extension license may automatically get checked out. This is because Engine single use licenses are not reference counted. It is highly recommended that extension licenses are always explicitly checked out using the CheckOutExtension method to support deployment of the application in both an environment that uses an Engine single use license and an environment that uses a license server (desktop single use or desktop concurrent licenses).
The CheckOutExtension method will fail to check out the specified extension license if:
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int checkInExtension(int extensionCode) throws IOException, AutomationException
Checks in the specified extension license once it has been checked out with the CheckOutExtension method.
The way that the extensions are checked in and out will depend on the type of product license passed to the Initialize method.
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void shutdown() throws IOException, AutomationException
Before an application is shut down the AOInitialize object must be shut down. This ensures that any ESRI libraries that have been used are unloaded in the correct order. Failure to do this may result in random crashes on exit due to the operating system unloading the libraries in the incorrect order.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int initializedProduct() throws IOException, AutomationException
The InitializedProduct method returns the product license that was passed to the Initialize method.
Checking what product license an application has been initialized with is useful for setting the enabled state of an applications functionality. For example, if an application containing some enterprise geodatabase editing has been initialized with an Engine Single Use with geodatabase editing or an ArcGIS for Desktop Standard or an ArcGIS for Desktop Advanced license, the editing functionality can be enabled. If, however, the application has been initialized with an Engine Single Use or ArcGIS for Desktop Basic license, the editing functionality must be disabled
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isExtensionCheckedOut(int extensionCode) throws IOException, AutomationException
Indicates whether the specified extension license is currently checked out. Extension licensess are checked out and in using CheckOutExtension and CheckInExtension methods.
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |