com.jacob.com

## Class ComThread

- java.lang.Object
- - com.jacob.com.ComThread

    public abstract class ComThread
    extends java.lang.Object

Represents a COM level thread This is an abstract class because all the methods are static and no instances are ever created.

### Field Summary

Fields
`static boolean` `haveSTA` Comment for `haveSTA`
`static MainSTA` `mainSTA` Comment for `mainSTA`

### Constructor Summary

Constructors
Constructor and Description
`ComThread()`

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static void` `doCoInitialize(int threadModel)`
`static void` `doCoUninitialize()`
`static void` `Init(boolean createMainSTA, int mode)` Initialize the current java thread to be part of the MTA/STA COM Apartment
`static void` `InitMTA()` Initialize the current java thread to be part of the Multi-threaded COM Apartment
`static void` `InitMTA(boolean createMainSTA)` Initialize the current java thread to be part of the Multi-threaded COM Apartment, if createMainSTA is true, create a separate MainSTA thread that will house all Apartment Threaded components
`static void` `InitSTA()` Initialize the current java thread to be an STA
`static void` `InitSTA(boolean createMainSTA)` Initialize the current java thread to be an STA COM Apartment, if createMainSTA is true, create a separate MainSTA thread that will house all Apartment Threaded components
`static void` `quitMainSTA()`
`static void` `Release()` Call CoUninitialize to release this java thread from COM
`static void` `RemoveObject(JacobObject o)` Deprecated. the java model leave the responsibility of clearing up objects to the Garbage Collector. Our programming model should not require that the user specifically remove object from the thread. This will remove an object from the ROT
`static void` `startMainSTA()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### haveSTA

    public static boolean haveSTA

Comment for `haveSTA`

#### mainSTA

    public static MainSTA mainSTA

Comment for `mainSTA`

### Constructor Detail

#### ComThread

    public ComThread()

### Method Detail

#### InitMTA

    public static void InitMTA()

Initialize the current java thread to be part of the Multi-threaded COM Apartment

#### InitSTA

    public static void InitSTA()

Initialize the current java thread to be an STA

#### InitMTA

    public static void InitMTA(boolean createMainSTA)

Initialize the current java thread to be part of the Multi-threaded COM Apartment, if createMainSTA is true, create a separate MainSTA thread that will house all Apartment Threaded components

Parameters:
  `createMainSTA` -

#### InitSTA

    public static void InitSTA(boolean createMainSTA)

Initialize the current java thread to be an STA COM Apartment, if createMainSTA is true, create a separate MainSTA thread that will house all Apartment Threaded components

Parameters:
  `createMainSTA` -

#### startMainSTA

    public static void startMainSTA()

#### quitMainSTA

    public static void quitMainSTA()

#### Init

    public static void Init(boolean createMainSTA,
                            int mode)

Initialize the current java thread to be part of the MTA/STA COM Apartment

Parameters:
  `createMainSTA` -
  `mode` -

#### Release

    public static void Release()

Call CoUninitialize to release this java thread from COM

#### RemoveObject

    @Deprecated
    public static void RemoveObject(JacobObject o)

Deprecated. the java model leave the responsibility of clearing up objects to the Garbage Collector. Our programming model should not require that the user specifically remove object from the thread. This will remove an object from the ROT

Parameters:
  `o` -

#### doCoInitialize

    public static void doCoInitialize(int threadModel)

Parameters:
  `threadModel` -

#### doCoUninitialize

    public static void doCoUninitialize()