|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.AoInitialize
public class AoInitialize
Class initializes ArcObject components runtime environment. This class must be the first ArcObject created.
Constructor Summary | |
---|---|
AoInitialize()
Constructs a AoInitialize on the local host. |
|
AoInitialize(com.esri.arcgis.interop.AuthInfo authInfo)
Deprecated. use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...) Please see Security section in the J-Integra for COM documentation |
|
AoInitialize(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
AoInitialize(String host)
Construct a AoInitialize on specified host. |
|
AoInitialize(String host,
com.esri.arcgis.interop.AuthInfo authInfo)
Deprecated. use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...) See Security section in the J-Integra for COM documentation |
Method Summary | |
---|---|
static AoInitialize |
bindUsingMoniker(String moniker)
bindUsingMoniker. |
int |
checkInExtension(int extensionCode)
Check in an extension. |
int |
checkOutExtension(int extensionCode)
Check out an extension. |
boolean |
equals(Object o)
Compare this object with another |
static AoInitialize |
getActiveObject()
getActiveObject. |
static String |
getClsid()
|
com.esri.arcgis.interop.Dispatch |
getJintegraDispatch()
J-Integra for COM internal method |
protected String |
getJintegraVersion()
|
String |
getLicenseExtensionName(int extensionCode)
Retrieve the name license extension code. |
String |
getLicenseProductName(int productCode)
Retrieve the name license product code. |
ILicenseInfoEnum |
getProductExtensions(int productCode)
Enumerate the extensions supported the product. |
Object |
getPropertyByName(String name)
getPropertyByName. |
Object |
getPropertyByName(String name,
Object rhs)
getPropertyByName. |
int |
hashCode()
the hashcode for this object |
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. |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
Object |
invokeMethodByName(String name)
invokeMethodByName. |
Object |
invokeMethodByName(String name,
Object[] parameters)
invokeMethodByName. |
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 |
release()
Release a AoInitialize. |
void |
shutdown()
Shutdown method. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AoInitialize() throws IOException, UnknownHostException
IOException
- if there are problems communicating via DCOM
UnknownHostException
- if the host can not be foundpublic AoInitialize(String host) throws IOException, UnknownHostException
host
- the host on which the object should be created
IOException
- if there are problems communicating via DCOM
UnknownHostException
- if the host can not be foundpublic AoInitialize(com.esri.arcgis.interop.AuthInfo authInfo) throws IOException, UnknownHostException
IOException
UnknownHostException
com.esri.arcgis.interop.AuthInfo.setDefault(..)
public AoInitialize(String host, com.esri.arcgis.interop.AuthInfo authInfo) throws IOException, UnknownHostException
IOException
UnknownHostException
com.esri.arcgis.interop.AuthInfo.setDefault(..)
public AoInitialize(Object obj) throws IOException
obj
- an object returned from a COM server
IOException
- if there are problems communicating via DCOMMethod Detail |
---|
public static String getClsid()
protected String getJintegraVersion()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public static AoInitialize getActiveObject() throws AutomationException, IOException
IOException
- If there are communications problems.
AutomationException
- If there was an error attaching to the instance.public static AoInitialize bindUsingMoniker(String moniker) throws AutomationException, IOException
moniker
- The ObjRef Moniker (Created using Windows CreateObjrefMoniker() and IMoniker->GetDisplayName).
IOException
- If there are communications problems.
AutomationException
- If there was an error attaching to the instance.public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
getJintegraDispatch
in interface com.esri.arcgis.interop.RemoteObjRef
public void release()
release
in interface com.esri.arcgis.interop.RemoteObjRef
public Object getPropertyByName(String name) throws NoSuchFieldException, IOException, AutomationException
name
- The name of the property to get.
NoSuchFieldException
- If the property does not exit.
IOException
- If there are communications problems.
AutomationException
- If the remote server throws an exception.public Object getPropertyByName(String name, Object rhs) throws NoSuchFieldException, IOException, AutomationException
name
- The name of the property to get.rhs
- A parameter used when getting the proxy.
NoSuchFieldException
- If the property does not exit.
IOException
- If there are communications problems.
AutomationException
- If the remote server throws an exception.public Object invokeMethodByName(String name, Object[] parameters) throws NoSuchMethodException, IOException, AutomationException
name
- The name of the method to be invoked.parameters
- One element for each parameter. Use primitive type wrappers.
to pass primitive types (eg Integer to pass an int).
NoSuchMethodException
- If the method does not exit.
IOException
- If there are communications problems.
AutomationException
- If the remote server throws an exception.public Object invokeMethodByName(String name) throws NoSuchMethodException, IOException, AutomationException
name
- The name of the method to be invoked.
NoSuchMethodException
- If the method does not exit.
IOException
- If there are communications problems.
AutomationException
- If the remote server throws an exception.public 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.
isProductCodeAvailable
in interface IAoInitialize
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
isExtensionCodeAvailable
in interface IAoInitialize
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.public 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.
initialize
in interface IAoInitialize
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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:
checkOutExtension
in interface IAoInitialize
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
checkInExtension
in interface IAoInitialize
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
shutdown
in interface IAoInitialize
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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
initializedProduct
in interface IAoInitialize
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
isExtensionCheckedOut
in interface IAoInitialize
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getLicenseProductName(int productCode) throws IOException, AutomationException
Returns the name of the specified license product code constant.
getLicenseProductName
in interface ILicenseInformation
productCode
- A com.esri.arcgis.system.esriLicenseProductCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public String getLicenseExtensionName(int extensionCode) throws IOException, AutomationException
Returns the name of the specified license extension code constant.
getLicenseExtensionName
in interface ILicenseInformation
extensionCode
- A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ILicenseInfoEnum getProductExtensions(int productCode) throws IOException, AutomationException
Returns an ILicenseInfoEnum collection of license extension codes supported by the specified license product code. Note that all supported extension codes are returned and not just the ones available on the current license server.
getProductExtensions
in interface ILicenseInformation
productCode
- A com.esri.arcgis.system.esriLicenseProductCode 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 |