com.esri.arcgis.framework
Class DllThreadManager

java.lang.Object
  extended by com.esri.arcgis.framework.DllThreadManager
All Implemented Interfaces:
IDllThreadManager, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class DllThreadManager
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDllThreadManager

DllThreadManager CoType.

Remarks

Multithreading refers to a software configuration where independent paths of execution are in use simultaneously in an application. Each thread has its own stack and its own CPU state.

A DLLThreadManager object is any object that implements the IDllThreadManager interface. The DLLThreadManager object will be notified prior to application shutdown so that all currently running threads can be exited cleanly before the Application process actually shuts down. If you are developing components that will create threads and will be used in any of the ArcGIS application processes, the dll that contains these components must also contain an object that implements IDllThreadManager. Also, you must use the IMultiThreadedApplication interface to register this thread manager object with that application.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
DllThreadManager(Object obj)
          Construct a DllThreadManager using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 int hashCode()
          the hashcode for this object
 void onShutdown()
          Occurs when the application is shutting down.
 
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

DllThreadManager

public DllThreadManager(Object obj)
                 throws IOException
Construct a DllThreadManager using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to DllThreadManager.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
DllThreadManager o = (DllThreadManager)obj; // will not work

DllThreadManager o = new DllThreadManager(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems DllThreadManager theDllThreadManager = (DllThreadManager) obj;
Method Detail

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

onShutdown

public void onShutdown()
                throws IOException,
                       AutomationException
Occurs when the application is shutting down. DLL threads should be terminated upon receiving this message.

Remarks

This method notifies the dll thread manager object that the application is shutting down so that the dll thread manager can terminate any threads that were created by the components in that dll.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
onShutdown in interface IDllThreadManager
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.