com.esri.arcgis.system
Class AoInitialize

java.lang.Object
  extended by com.esri.arcgis.system.AoInitialize
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IAoInitialize, ILicenseInformation, ISupportErrorInfo, java.io.Serializable

public class AoInitialize
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IAoInitialize, ISupportErrorInfo, ILicenseInformation

Class initializes ArcObject components runtime environment. This class must be the first ArcObject created.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IAoInitialize
IID, IID9ab6a638_aca8_4820_830c_463ea11c8722, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.ILicenseInformation
IID, IIDebe6bd5b_2f03_48f0_b68b_6de8c4bdef32, xxDummy
 
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(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AoInitialize(java.lang.String host)
          Construct a AoInitialize on specified host.
AoInitialize(java.lang.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(java.lang.String moniker)
          bindUsingMoniker.
 int checkInExtension(int extensionCode)
          Check in an extension.
 int checkOutExtension(int extensionCode)
          Check out an extension.
 boolean equals(java.lang.Object o)
          Compare this object with another
static AoInitialize getActiveObject()
          getActiveObject.
static java.lang.String getClsid()
           
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          J-Integra for COM internal method
protected  java.lang.String getJintegraVersion()
           
 java.lang.String getLicenseExtensionName(int extensionCode)
          Retrieve the name license extension code.
 java.lang.String getLicenseProductName(int productCode)
          Retrieve the name license product code.
 ILicenseInfoEnum getProductExtensions(int productCode)
          Enumerate the extensions supported the product.
 java.lang.Object getPropertyByName(java.lang.String name)
          getPropertyByName.
 java.lang.Object getPropertyByName(java.lang.String name, java.lang.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
 java.lang.Object invokeMethodByName(java.lang.String name)
          invokeMethodByName.
 java.lang.Object invokeMethodByName(java.lang.String name, java.lang.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

AoInitialize

public AoInitialize()
             throws java.io.IOException,
                    java.net.UnknownHostException
Constructs a AoInitialize on the local host.

Throws:
java.io.IOException - if there are problems communicating via DCOM
java.net.UnknownHostException - if the host can not be found

AoInitialize

public AoInitialize(java.lang.String host)
             throws java.io.IOException,
                    java.net.UnknownHostException
Construct a AoInitialize on specified host.

Parameters:
host - the host on which the object should be created
Throws:
java.io.IOException - if there are problems communicating via DCOM
java.net.UnknownHostException - if the host can not be found

AoInitialize

public AoInitialize(com.esri.arcgis.interop.AuthInfo authInfo)
             throws java.io.IOException,
                    java.net.UnknownHostException
Deprecated. use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...) Please see Security section in the J-Integra for COM documentation

Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
com.esri.arcgis.interop.AuthInfo.setDefault(..)

AoInitialize

public AoInitialize(java.lang.String host,
                    com.esri.arcgis.interop.AuthInfo authInfo)
             throws java.io.IOException,
                    java.net.UnknownHostException
Deprecated. use AuthInfo.setDefault(...) or AuthInfo.setThreadDefault(...) See Security section in the J-Integra for COM documentation

Throws:
java.io.IOException
java.net.UnknownHostException
See Also:
com.esri.arcgis.interop.AuthInfo.setDefault(..)

AoInitialize

public AoInitialize(java.lang.Object obj)
             throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a AoInitialize using a reference to such an object returned from a COM server

Parameters:
obj - an object returned from a COM server
Throws:
java.io.IOException - if there are problems communicating via DCOM
Method Detail

getClsid

public static java.lang.String getClsid()

getJintegraVersion

protected java.lang.String getJintegraVersion()

equals

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

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getActiveObject

public static AoInitialize getActiveObject()
                                    throws AutomationException,
                                           java.io.IOException
getActiveObject. Get a reference to a running instance of this class on the current machine using native code. Uses native code (See GetActiveObject() in MS doc) and thus can only be used on MS Windows

Returns:
A reference to the running object.
Throws:
java.io.IOException - If there are communications problems.
AutomationException - If there was an error attaching to the instance.

bindUsingMoniker

public static AoInitialize bindUsingMoniker(java.lang.String moniker)
                                     throws AutomationException,
                                            java.io.IOException
bindUsingMoniker. Bind to a running instance of this class using the supplied ObjRef moniker

Parameters:
moniker - The ObjRef Moniker (Created using Windows CreateObjrefMoniker() and IMoniker->GetDisplayName).
Returns:
A reference to the running object.
Throws:
java.io.IOException - If there are communications problems.
AutomationException - If there was an error attaching to the instance.

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
J-Integra for COM internal method

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a AoInitialize.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getPropertyByName

public java.lang.Object getPropertyByName(java.lang.String name)
                                   throws java.lang.NoSuchFieldException,
                                          java.io.IOException,
                                          AutomationException
getPropertyByName. Get the value of a property dynamically at run-time, based on its name

Parameters:
name - The name of the property to get.
Returns:
The value of the property.
Throws:
java.lang.NoSuchFieldException - If the property does not exit.
java.io.IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

getPropertyByName

public java.lang.Object getPropertyByName(java.lang.String name,
                                          java.lang.Object rhs)
                                   throws java.lang.NoSuchFieldException,
                                          java.io.IOException,
                                          AutomationException
getPropertyByName. Get the value of a property dynamically at run-time, based on its name and a parameter

Parameters:
name - The name of the property to get.
rhs - A parameter used when getting the proxy.
Returns:
The value of the property.
Throws:
java.lang.NoSuchFieldException - If the property does not exit.
java.io.IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

invokeMethodByName

public java.lang.Object invokeMethodByName(java.lang.String name,
                                           java.lang.Object[] parameters)
                                    throws java.lang.NoSuchMethodException,
                                           java.io.IOException,
                                           AutomationException
invokeMethodByName. Invoke a method dynamically at run-time

Parameters:
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).
Returns:
The value returned by the method (null if none).
Throws:
java.lang.NoSuchMethodException - If the method does not exit.
java.io.IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

invokeMethodByName

public java.lang.Object invokeMethodByName(java.lang.String name)
                                    throws java.lang.NoSuchMethodException,
                                           java.io.IOException,
                                           AutomationException
invokeMethodByName. Invoke a method dynamically at run-time

Parameters:
name - The name of the method to be invoked.
Returns:
The value returned by the method (null if none).
Throws:
java.lang.NoSuchMethodException - If the method does not exit.
java.io.IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

isProductCodeAvailable

public int isProductCodeAvailable(int productCode)
                           throws java.io.IOException,
                                  AutomationException
Check if the Product Code is available.

Specified by:
isProductCodeAvailable in interface IAoInitialize
Parameters:
productCode - A com.esri.arcgis.system.esriLicenseProductCode constant (in)
Returns:
A com.esri.arcgis.system.esriLicenseStatus constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isExtensionCodeAvailable

public int isExtensionCodeAvailable(int productCode,
                                    int extensionCode)
                             throws java.io.IOException,
                                    AutomationException
Check if the Product Code is available and then the Extension Code for that product.

Specified by:
isExtensionCodeAvailable in interface IAoInitialize
Parameters:
productCode - A com.esri.arcgis.system.esriLicenseProductCode constant (in)
extensionCode - A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
Returns:
A com.esri.arcgis.system.esriLicenseStatus constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initialize

public int initialize(int productCode)
               throws java.io.IOException,
                      AutomationException
This must be called before any other ArcObjects are created to initialize product Code. If called a second time during the life time of an executable with a new product code, it will return esriLicenseAlreadyInitialized.

Specified by:
initialize in interface IAoInitialize
Parameters:
productCode - A com.esri.arcgis.system.esriLicenseProductCode constant (in)
Returns:
A com.esri.arcgis.system.esriLicenseStatus constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkOutExtension

public int checkOutExtension(int extensionCode)
                      throws java.io.IOException,
                             AutomationException
Check out an extension.

Specified by:
checkOutExtension in interface IAoInitialize
Parameters:
extensionCode - A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
Returns:
A com.esri.arcgis.system.esriLicenseStatus constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

checkInExtension

public int checkInExtension(int extensionCode)
                     throws java.io.IOException,
                            AutomationException
Check in an extension.

Specified by:
checkInExtension in interface IAoInitialize
Parameters:
extensionCode - A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
Returns:
A com.esri.arcgis.system.esriLicenseStatus constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

public void shutdown()
              throws java.io.IOException,
                     AutomationException
Shutdown method. This should be the last call to ArcObjects in an application.

Specified by:
shutdown in interface IAoInitialize
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initializedProduct

public int initializedProduct()
                       throws java.io.IOException,
                              AutomationException
Retrieve's the product code at which the application has been initialized.

Specified by:
initializedProduct in interface IAoInitialize
Returns:
A com.esri.arcgis.system.esriLicenseProductCode constant
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isExtensionCheckedOut

public boolean isExtensionCheckedOut(int extensionCode)
                              throws java.io.IOException,
                                     AutomationException
Is the Extension checked out.

Specified by:
isExtensionCheckedOut in interface IAoInitialize
Parameters:
extensionCode - A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
Returns:
The checkedOut
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLicenseProductName

public java.lang.String getLicenseProductName(int productCode)
                                       throws java.io.IOException,
                                              AutomationException
Retrieve the name license product code.

Specified by:
getLicenseProductName in interface ILicenseInformation
Parameters:
productCode - A com.esri.arcgis.system.esriLicenseProductCode constant (in)
Returns:
The productName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLicenseExtensionName

public java.lang.String getLicenseExtensionName(int extensionCode)
                                         throws java.io.IOException,
                                                AutomationException
Retrieve the name license extension code.

Specified by:
getLicenseExtensionName in interface ILicenseInformation
Parameters:
extensionCode - A com.esri.arcgis.system.esriLicenseExtensionCode constant (in)
Returns:
The extensionName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getProductExtensions

public ILicenseInfoEnum getProductExtensions(int productCode)
                                      throws java.io.IOException,
                                             AutomationException
Enumerate the extensions supported the product.

Specified by:
getProductExtensions in interface ILicenseInformation
Parameters:
productCode - A com.esri.arcgis.system.esriLicenseProductCode constant (in)
Returns:
A reference to a com.esri.arcgis.system.ILicenseInfoEnum
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.