public final class JIComServer extends Stub
Sample Usage :-
JISession session =
JISession.createSession("DOMAIN","USERNAME","PASSWORD");
JIComServer excelServer = new
JIComServer(JIProgId.valueOf("Excel.Application"),address,session);
IJIComObject comObject = excelServer.createInstance();
//Obtaining the IJIDispatch (if supported)
IJIDispatch dispatch
=
(IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID));
Each instance of this class is associated with a single session only.
| Constructor and Description |
|---|
JIComServer(JIClsid clsid,
JISession session)
< p>
based constructor with the host machine for
COM server being LOCALHOST. |
JIComServer(JIClsid clsid,
String address,
JISession session)
< p>
Refer
JIComServer(JIClsid, JISession) for details. |
JIComServer(JIProgId progId,
JISession session)
< p>
JIProgId based constructor with the host machine for COM
server being LOCALHOST. |
JIComServer(JIProgId progId,
String address,
JISession session)
< p>
Refer
JIComServer(JIProgId, JISession) for details. |
| Modifier and Type | Method and Description |
|---|---|
IJIComObject |
createInstance()
Returns an
IJIComObject representing the COM Server. |
protected String |
getSyntax() |
attach, call, detach, getAddress, getEndpoint, getObject, getProperties, getTransportFactory, setAddress, setEndpoint, setObject, setProperties, setTransportFactorypublic JIComServer(JIProgId progId, JISession session) throws JIException, UnknownHostException
JIProgId based constructor with the host machine for COM
server being LOCALHOST.progId - user-friendly string such as "Excel.Application" ,
"TestCOMServer.Test123" etc.session - session to be associated with.JIException - will also get thrown in case the
session is associated with another server already.IllegalArgumentException - raised when either progId
or session is null.UnknownHostExceptionpublic JIComServer(JIClsid clsid, JISession session) throws IllegalArgumentException, JIException, UnknownHostException
JIClsid based constructor with the host machine for
COM server being LOCALHOST.clsid - 128 bit string such as
"00024500-0000-0000-C000-000000000046".session - session to be associated with.JIException - will also get thrown in case the
session is associated with another server already.IllegalArgumentException - raised when either clsid or
session is null.UnknownHostExceptionpublic JIComServer(JIProgId progId, String address, JISession session) throws JIException, UnknownHostException
JIComServer(JIProgId, JISession) for details.progId - user-friendly string such as "Excel.Application" ,
"TestCOMServer.Test123" etc.address - address of the host where the COM object
resides.This should be in the IEEE IP format (e.g. 192.168.170.6) or a
resolvable HostName.session - session to be associated with.JIException - will also get thrown in case the
session is associated with another server already.IllegalArgumentException - raised when any of the parameters is
null.UnknownHostExceptionpublic JIComServer(JIClsid clsid, String address, JISession session) throws JIException, UnknownHostException
JIComServer(JIClsid, JISession) for details.clsid - 128 bit string such as
"00024500-0000-0000-C000-000000000046".address - address of the host where the COM object
resides.This should be in the IEEE IP format (e.g. 192.168.170.6) or a
resolvable HostName.session - session to be associated with.JIException - will also get thrown in case the
session is associated with another server already.IllegalArgumentException - raised when any of the parameters is
null.UnknownHostExceptionpublic IJIComObject createInstance() throws JIException
IJIComObject representing the COM Server.JIExceptionCopyright © 2022. All rights reserved.