/** <p>Refer {@link #JIComServer(JIClsid, JISession)} for details. * * * @param clsid 128 bit string such as "00024500-0000-0000-C000-000000000046". * @param address address of the host where the <code>COM</code> object resides.This should be in the IEEE IP format (e.g. 192.168.170.6) or a resolvable HostName. * @param session session to be associated with. * @throws JIException will <i>also</i> get thrown in case the <code>session</code> is associated with another server already. * @throws IllegalArgumentException raised when any of the parameters is <code>null</code>. * @throws UnknownHostException */ public JIComServer(JIClsid clsid,String address, JISession session) throws JIException, UnknownHostException { super(); if (clsid == null || address == null || session == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMSTUB_ILLEGAL_ARGUMENTS)); } if (session.getStub() != null) { throw new JIException(JIErrorCodes.JI_SESSION_ALREADY_ESTABLISHED); } address = address.trim(); //address = address.replace(' ',''); address = "ncacn_ip_tcp:"+InetAddress.getByName(address).getHostAddress()+"[135]"; initialise(clsid,address,session); }
/** <p>Refer {@link #JIComServer(JIClsid, JISession)} for details. * * * @param clsid 128 bit string such as "00024500-0000-0000-C000-000000000046". * @param address address of the host where the <code>COM</code> object resides.This should be in the IEEE IP format (e.g. 192.168.170.6) or a resolvable HostName. * @param session session to be associated with. * @throws JIException will <i>also</i> get thrown in case the <code>session</code> is associated with another server already. * @throws IllegalArgumentException raised when any of the parameters is <code>null</code>. * @throws UnknownHostException */ public JIComServer(JIClsid clsid,String address, JISession session) throws JIException, UnknownHostException { super(); if (clsid == null || address == null || session == null) { throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_COMSTUB_ILLEGAL_ARGUMENTS)); } if (session.getStub() != null) { throw new JIException(JIErrorCodes.JI_SESSION_ALREADY_ESTABLISHED); } address = address.trim(); //address = address.replace(' ',''); address = "ncacn_ip_tcp:"+InetAddress.getByName(address).getHostAddress()+"[135]"; initialise(clsid,address,session); }
initialise ( clsid, address, session );
address = "ncacn_ip_tcp:"+address+"[135]"; JIClsid clsid = progId.getCorrespondingCLSID(); initialise(clsid,address,session);
address = "ncacn_ip_tcp:"+address+"[135]"; JIClsid clsid = progId.getCorrespondingCLSID(); initialise(clsid,address,session);
address = "ncacn_ip_tcp:" + address + "[135]"; final JIClsid clsid = progId.getCorrespondingCLSID (); initialise ( clsid, address, session );