com.esri.arcgis.addinframework
Interface IThreadingServices

All Superinterfaces:
Serializable
All Known Implementing Classes:
IThreadingServicesProxy

public interface IThreadingServices
extends Serializable


Method Summary
 IThreadPool createPool(IThreadPoolImpl pWorker, int minThreads, int maxThreads, int priority)
          Creates a worker thread pool.
 IThreadPool createPoolEx(IThreadPoolImpl pWorker, int minThreads, int maxThreads, int priority, int flags)
          Creates a worker thread pool.
 int getGUIThreadID()
          Returns the GUI thread ID.
 void getShutdownComplete()
          Returns an event which will be signaled when the threading services have completely uninitialized.
 int getTLSValue(String valueName)
          Get user defined thread local value for the calling thread.
 void isCanceled()
          Get thread local cancellation state.
 void setTLSValue(String valueName, int pValue)
          Set user defined thread local value for the calling thread.
 void shutdown()
          Signals the threading services to cancel all requests and terminate.
 void updateStatus(String status)
          Update thread local status.
 

Method Detail

createPool

IThreadPool createPool(IThreadPoolImpl pWorker,
                       int minThreads,
                       int maxThreads,
                       int priority)
                       throws IOException,
                              AutomationException
Creates a worker thread pool.

Parameters:
pWorker - A reference to a com.esri.arcgis.addinframework.IThreadPoolImpl (in)
minThreads - The minThreads (in)
maxThreads - The maxThreads (in)
priority - A com.esri.arcgis.addinframework.esriThreadPoolPriority constant (in)
Returns:
A reference to a com.esri.arcgis.addinframework.IThreadPool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGUIThreadID

int getGUIThreadID()
                   throws IOException,
                          AutomationException
Returns the GUI thread ID.

Returns:
The pThreadID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanceled

void isCanceled()
                throws IOException,
                       AutomationException
Get thread local cancellation state.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateStatus

void updateStatus(String status)
                  throws IOException,
                         AutomationException
Update thread local status.

Parameters:
status - The status (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTLSValue

int getTLSValue(String valueName)
                throws IOException,
                       AutomationException
Get user defined thread local value for the calling thread.

Parameters:
valueName - The valueName (in)
Returns:
The ppValue (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTLSValue

void setTLSValue(String valueName,
                 int pValue)
                 throws IOException,
                        AutomationException
Set user defined thread local value for the calling thread.

Parameters:
valueName - The valueName (in)
pValue - The pValue (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

shutdown

void shutdown()
              throws IOException,
                     AutomationException
Signals the threading services to cancel all requests and terminate.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getShutdownComplete

void getShutdownComplete()
                         throws IOException,
                                AutomationException
Returns an event which will be signaled when the threading services have completely uninitialized.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createPoolEx

IThreadPool createPoolEx(IThreadPoolImpl pWorker,
                         int minThreads,
                         int maxThreads,
                         int priority,
                         int flags)
                         throws IOException,
                                AutomationException
Creates a worker thread pool.

Parameters:
pWorker - A reference to a com.esri.arcgis.addinframework.IThreadPoolImpl (in)
minThreads - The minThreads (in)
maxThreads - The maxThreads (in)
priority - A com.esri.arcgis.addinframework.esriThreadPoolPriority constant (in)
flags - A com.esri.arcgis.addinframework.esriThreadPoolFlags constant (in)
Returns:
A reference to a com.esri.arcgis.addinframework.IThreadPool
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.