public class ComServer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.String,java.lang.Class> |
vault
The map of all registered COM objects.
|
Constructor and Description |
---|
ComServer() |
Modifier and Type | Method and Description |
---|---|
static void |
create(java.lang.String comObjectType,
comhandle handle)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(java.lang.String comObjectType,
comhandle handle,
boolean connect)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(java.lang.String comObjectType,
comhandle handle,
boolean connect,
java.lang.String documentPath)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(java.lang.String comObjectType,
comhandle handle,
boolean connect,
Text docPath)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(Text comType,
comhandle handle)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(Text comType,
comhandle handle,
boolean connect)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(Text comType,
comhandle handle,
boolean connect,
java.lang.String documentPath)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
create(Text comType,
comhandle handle,
boolean connect,
Text docPath)
Creates a new instance of the
automation object and assigns it to provided
comhandle if operation is successful. |
static void |
emit(ComEvent event)
Emit an event by asynchronously calling the associated procedure.
|
private static ComObject |
getAutomation(java.lang.String comObjectType,
boolean topLevel,
boolean noCreate)
Obtain a reference to an automation.
|
static void |
release(comhandle handle)
Releases resources occupied by a valid
ComObject store in a comhandle . |
private static java.util.Map<java.lang.String,java.lang.Class> vault
public static void release(comhandle handle)
ComObject
store in a comhandle
.handle
- The comhandle
that holds the COM object to be deleted.public static void emit(ComEvent event)
event
- The event to be delivered.public static void create(java.lang.String comObjectType, comhandle handle)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comObjectType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.public static void create(Text comType, comhandle handle)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.public static void create(java.lang.String comObjectType, comhandle handle, boolean connect)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comObjectType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.public static void create(Text comType, comhandle handle, boolean connect)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.public static void create(java.lang.String comObjectType, comhandle handle, boolean connect, java.lang.String documentPath)
automation
object and assigns it to provided
comhandle
if operation is successful.comObjectType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.documentPath
- The document that will be open or connect to.public static void create(Text comType, comhandle handle, boolean connect, java.lang.String documentPath)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.documentPath
- The document that will be open or connect to.public static void create(java.lang.String comObjectType, comhandle handle, boolean connect, Text docPath)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comObjectType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.docPath
- The document that will be open or connect to.public static void create(Text comType, comhandle handle, boolean connect, Text docPath)
automation
object and assigns it to provided
comhandle
if operation is successful.
A new instance of the Server for object is launched.
comType
- The name of the automation
.handle
- A comhandle
to store the handle to new object.connect
- If true
attempt to connect to an active (instantiated) Automation object
identified by comObjectType
.docPath
- The document that will be open or connect to.private static ComObject getAutomation(java.lang.String comObjectType, boolean topLevel, boolean noCreate)
comObjectType
- The name of the automation.topLevel
- Only return top-level. If the requested comObjectType
is not a top-level,
return null
.noCreate
- Must exist. Do not allow creation of new instances. Only used with topLevel
requests.ComObject
requested, or null
if such automation does not exist
or it does not satisfy the parameter constraints.