com.esri.arcgis.framework
Class IAppROTProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.framework.IAppROTProxy
All Implemented Interfaces:
IAppROT, Externalizable, Serializable

public class IAppROTProxy
extends com.esri.arcgis.interop.Dispatch
implements IAppROT, Serializable

Provides access to members that manipulate the ESRI application running object table, AppROT.

When To Use

Use the IAppROT interface to work with the Application Running Object Table (AppROT) for ESRI applications. This interface has methods for adding and removing instances of an application to/from the AppROT. Also using this interface you can get a count of how many application are registered with the AppROT or return a particular instance of an application.

Product Availability

Available with ArcGIS Desktop.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IAppROTProxy()
           
  IAppROTProxy(Object obj)
           
protected IAppROTProxy(Object obj, String iid)
           
 
Method Summary
 int add(IApplication pApp)
          Adds an application reference to the running object table.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 int getCount()
          The count of application references within the running object table.
 IApplication getItem(int index)
          The application reference at the specified index in the running object table.
 void remove(int cookie)
          Removes an application reference from the running object table.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IAppROTProxy

public IAppROTProxy()

IAppROTProxy

public IAppROTProxy(Object obj)
             throws IOException
Throws:
IOException

IAppROTProxy

protected IAppROTProxy(Object obj,
                       String iid)
                throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

add

public int add(IApplication pApp)
        throws IOException,
               AutomationException
Adds an application reference to the running object table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
add in interface IAppROT
Parameters:
pApp - A reference to a com.esri.arcgis.framework.IApplication (in)
Returns:
The cookie
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IApplication

remove

public void remove(int cookie)
            throws IOException,
                   AutomationException
Removes an application reference from the running object table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
remove in interface IAppROT
Parameters:
cookie - The cookie (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

public int getCount()
             throws IOException,
                    AutomationException
The count of application references within the running object table.

Remarks

The following example uses AppROT's Count property to determine if any applications are already running. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCount in interface IAppROT
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

public IApplication getItem(int index)
                     throws IOException,
                            AutomationException
The application reference at the specified index in the running object table.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getItem in interface IAppROT
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.framework.IApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.