public class ComOleDaemon extends java.lang.Object implements ComOleOps
ComOleHelper
. Exposes these APIs to the server-side via a ComOleOps
network
server.Modifier and Type | Field and Description |
---|---|
private static java.lang.Object |
modToken
Token used to authenticate with the dispatcher when registering APIs.
|
Constructor and Description |
---|
ComOleDaemon(boolean single)
Create an instance and export its API to the network.
|
Modifier and Type | Method and Description |
---|---|
BaseDataType[][] |
call(long comId,
java.lang.String methodName,
ComParameter[] aParams)
Execute a COM object method call.
|
long |
create(java.lang.String comObjectType,
boolean topLevel,
boolean noCreate)
Obtain a reference to an automation.
|
java.lang.String |
getName(long comId)
Get the COM object name associated with the given COM object ID.
|
BaseDataType |
getProperty(long comId,
java.lang.String prop)
Get the specified COM object property.
|
boolean |
isSupported()
Gets COM Automation support level for particular OS.
|
void |
release(long comId)
Release and destroy the COM object with the specified ID.
|
boolean |
setProperty(long comId,
java.lang.String prop,
ComParameter val,
ComParameter[] indices)
Set the specified COM object property.
|
private static java.lang.Object modToken
public ComOleDaemon(boolean single)
single
- true
to startup within the server process which
must bypass the shared infrastructure initialization. Use
false
for the normal client JVM startup.public void release(long comId)
public long create(java.lang.String comObjectType, boolean topLevel, boolean noCreate)
create
in interface ComOleOps
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.0
if such automation does not exist
or it does not satisfy the parameter constraints.public BaseDataType getProperty(long comId, java.lang.String prop)
getProperty
in interface ComOleOps
comId
- The COM object ID.prop
- The COM property name to retrieve.BaseDataType
instance with the COM property's details.public boolean setProperty(long comId, java.lang.String prop, ComParameter val, ComParameter[] indices)
setProperty
in interface ComOleOps
comId
- The COM object ID.prop
- The COM property name to set.val
- The details about property's new value.indices
- A variable number of indices used to access this property's element.true
if the property was set successfully.public BaseDataType[][] call(long comId, java.lang.String methodName, ComParameter[] aParams)
call
in interface ComOleOps
comId
- The COM object ID.methodName
- The COM method name to call.aParams
- An array with this call's arguments supplied to the COM object method call.public java.lang.String getName(long comId)
public boolean isSupported()
isSupported
in interface ComOleOps
TRUE
if COM objects are supported, FALSE
otherwise.