|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrpc.Stub
org.jinterop.dcom.core.JIComServer
public final class JIComServer
Startup class representing a COM Server.
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 Summary | |
|---|---|
JIComServer(JIClsid clsid,
JISession session)
based constructor with the host machine for COM server being LOCALHOST. |
|
JIComServer(JIClsid clsid,
java.lang.String address,
JISession session)
Refer JIComServer(JIClsid, JISession) for details. |
|
JIComServer(JIProgId progId,
JISession session)
JIProgId based constructor with the host machine for COM server being LOCALHOST. |
|
JIComServer(JIProgId progId,
java.lang.String address,
JISession session)
Refer JIComServer(JIProgId, JISession) for details. |
|
| Method Summary | |
|---|---|
IJIComObject |
createInstance()
Returns an IJIComObject representing the COM Server. |
protected java.lang.String |
getSyntax()
|
| Methods inherited from class rpc.Stub |
|---|
attach, call, detach, getAddress, getEndpoint, getObject, getProperties, getTransportFactory, setAddress, setEndpoint, setObject, setProperties, setTransportFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JIComServer(JIProgId progId,
JISession session)
throws JIException,
java.net.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.
java.lang.IllegalArgumentException - raised when either progId or session is null.
java.net.UnknownHostException
public JIComServer(JIClsid clsid,
JISession session)
throws java.lang.IllegalArgumentException,
JIException,
java.net.UnknownHostException
based constructor with the host machine for COM server being LOCALHOST.
JIClsid
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.
java.lang.IllegalArgumentException - raised when either clsid or session is null.
java.net.UnknownHostException
public JIComServer(JIProgId progId,
java.lang.String address,
JISession session)
throws JIException,
java.net.UnknownHostException
Refer 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.
java.lang.IllegalArgumentException - raised when any of the parameters is null.
java.net.UnknownHostException
public JIComServer(JIClsid clsid,
java.lang.String address,
JISession session)
throws JIException,
java.net.UnknownHostException
Refer 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.
java.lang.IllegalArgumentException - raised when any of the parameters is null.
java.net.UnknownHostException| Method Detail |
|---|
public IJIComObject createInstance()
throws JIException
IJIComObject representing the COM Server.
JIExceptionprotected java.lang.String getSyntax()
getSyntax in class Stub
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||