com.esri.arcgis.system
Class ESRILicenseInfo

java.lang.Object
  extended by com.esri.arcgis.system.ESRILicenseInfo
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IESRILicenseInfo, Serializable

public class ESRILicenseInfo
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IESRILicenseInfo

ESRI License Info.

Description

Use the ESRILicenseInfo object to determine the current license level in use and whether a specific product is licensed.

Remarks

The object models for ArcView, ArcEditor, and ArcInfo at ArcGIS 8.1 are identical. All classes, interfaces, methods, and properties are present in all products. This means that the same DLLs containing the same components with the same GUIDs are installed for all deployments; in other words, code written on one deployment will successfully compile on another. What will differ for the various deployments is the behavior of certain method calls.

As a developer you may need to know what license is currently checked out by the user, so that your code can be robust enough to work on all deploymets, or at least have the appropriate error checking.

To determine the level of license currently in use, use the ESRILicenseInfo coclass and the DefaultProduct property on its IESRILicenseInfo interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
ESRILicenseInfo()
          Constructs a ESRILicenseInfo using ArcGIS Engine.
ESRILicenseInfo(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ESRILicenseInfo theESRILicenseInfo = (ESRILicenseInfo) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getDefaultProduct()
          Indicates the product code that will be used on the current machine.
 int hashCode()
          the hashcode for this object
 boolean isLicensed(int productCode)
          Indicates if the specified product is licensed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

ESRILicenseInfo

public ESRILicenseInfo()
                throws IOException,
                       UnknownHostException
Constructs a ESRILicenseInfo using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

ESRILicenseInfo

public ESRILicenseInfo(Object obj)
                throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ESRILicenseInfo theESRILicenseInfo = (ESRILicenseInfo) obj;

Construct a ESRILicenseInfo using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to ESRILicenseInfo.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getDefaultProduct

public int getDefaultProduct()
                      throws IOException,
                             AutomationException
Indicates the product code that will be used on the current machine.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultProduct in interface IESRILicenseInfo
Returns:
A com.esri.arcgis.system.esriProductCode constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLicensed

public boolean isLicensed(int productCode)
                   throws IOException,
                          AutomationException
Indicates if the specified product is licensed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isLicensed in interface IESRILicenseInfo
Parameters:
productCode - A com.esri.arcgis.system.esriProductCode constant (in)
Returns:
The licensed
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.