com.esri.arcgis.framework
Class AppROT

java.lang.Object
  extended by com.esri.arcgis.framework.AppROT
All Implemented Interfaces:
IConnectionPointContainer, IAppROT, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AppROT
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IAppROT, IConnectionPointContainer

ESRI application running object table.

Remarks

The AppROT, or application running object table, is used as a global list of all currently running ESRI ArcGIS applications. The AppROT only contains application objects which implement ESRI's IApplication interface. ArcMap, ArcCatalog, and all future ESRI ArcGIS applications will automatically register themselves in this table when run and will remove themselves from the table when they exit, thus a complete list of all running applications at any given moment can be obtained using this object. In addition, developers creating their own "stand-alone" applications using ArcObjects are free to leverage off this mechanism by creating their own implementation of IApplication and registering themselves in the AppROT.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
AppROT()
          Constructs a AppROT using ArcGIS Engine.
AppROT(Object obj)
          Construct a AppROT using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 int add(IApplication pApp)
          Adds an application reference to the running object table.
 void addIAppROTEventsListener(IAppROTEvents theListener)
          addIAppROTEventsListener.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
static String getClsid()
          getClsid.
 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.
 int hashCode()
          the hashcode for this object
 void remove(int cookie)
          Removes an application reference from the running object table.
 void removeIAppROTEventsListener(IAppROTEvents theListener)
          removeIAppROTEventsListener.
 
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

AppROT

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

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

AppROT

public AppROT(Object obj)
       throws IOException
Construct a AppROT using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AppROT.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems AppROT theAppROT = (AppROT) obj;
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

addIAppROTEventsListener

public void addIAppROTEventsListener(IAppROTEvents theListener)
                              throws IOException
addIAppROTEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.framework.IAppROTEvents interface.
Throws:
IOException - If there are communications problems.

removeIAppROTEventsListener

public void removeIAppROTEventsListener(IAppROTEvents theListener)
                                 throws IOException
removeIAppROTEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.framework.IAppROTEvents interface.
Throws:
IOException - If there are communications problems.

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.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.