• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JIComServer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jinterop.dcom.core.JIComServer的典型用法代码示例。如果您正苦于以下问题:Java JIComServer类的具体用法?Java JIComServer怎么用?Java JIComServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JIComServer类属于org.jinterop.dcom.core包,在下文中一共展示了JIComServer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) {
	
		try {
				
			JISession session = JISession.createSession();
			JIComServer comServer = new JIComServer(JIClsid.valueOf("00024500-0000-0000-C000-000000000046"), session);
			IJIComObject comObject = comServer.createInstance();
			int h = 0;
			
//			SSPIJNIClient jniClient = SSPIJNIClient.getInstance();
//			byte[] type1Message = jniClient.invokePrepareSSORequest();
//			jcifs.util.Hexdump.hexdump(System.out, type1Message, 0, type1Message.length);
//			int h = 0;
//			
//			jniClient.invokeUnInitialize();
//			
//			type1Message = new Type1Message().toByteArray();
//			jcifs.util.Hexdump.hexdump(System.out, type1Message, 0, type1Message.length);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:25,代码来源:TestWinNativeSSO.java


示例2: connect

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
/**
 * Create a new session.
 *
 * @throws KettleException
 */
public void connect() throws KettleException {
	try {

		JISystem.getLogger().setLevel(Level.OFF);
		JISystem.setAutoRegisteration(true);
		if(Const.isEmpty(getHost())) {
			this.session = JISession.createSession();
		}else {
			this.session = JISession.createSession(getDomain(), getUserName(), this.password);
		}
		this.session.useSessionSecurity(true);
		
		if(log.isDebug()) {
			log.logDebug(BaseMessages.getString(PKG, "WMIQuery.SessionCreated", this.session.getSessionIdentifier()));
		}
		this.comServer = new JIComServer(valueOf("WbemScripting.SWbemLocator"), this.hostName , this.session);
		this.wbemLocator = (IJIDispatch) narrowObject(this.comServer.createInstance().queryInterface(IID));
		
	}catch(Exception e) {
		throw new KettleException(e);
	}
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:28,代码来源:WMIQuery.java


示例3: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main ( final String[] args ) throws IllegalArgumentException, UnknownHostException, JIException
{
    final TestConfiguration configuration = new MatrikonSimulationServerConfiguration ();

    OPCServer server = null;
    try
    {
        JISystem.setAutoRegisteration ( true );

        _session = JISession.createSession ( args[1], args[2], args[3] );

        //JIComServer comServer = new JIComServer ( JIClsid.valueOf ( configuration.getCLSID () ), args[0], _session );
        final JIComServer comServer = new JIComServer ( JIProgId.valueOf ( configuration.getProgId () ), args[0], _session );

        final IJIComObject serverObject = comServer.createInstance ();
        server = new OPCServer ( serverObject );

        final OPCGroupStateMgt group = server.addGroup ( "test", true, 100, 1234, 60, 0.0f, 1033 );

        testItems ( server, group, configuration.getReadItems () );
        server.removeGroup ( group, true );
    }
    catch ( final JIException e )
    {
        e.printStackTrace ();
        showError ( server, e.getErrorCode () );
    }
    finally
    {
        if ( _session != null )
        {
            JISession.destroySession ( _session );
        }
        _session = null;
    }
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:37,代码来源:Test2.java


示例4: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	JISystem.setAutoRegisteration(true);

	/**
	 * Session获取
	 */
	JISession _session = JISession.createSession(
			getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
			getEntryValue(CONFIG_PASSWORD));

	final JIComServer comServer = new JIComServer(
			JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
			getEntryValue(CONFIG_HOST), _session);

	final IJIComObject serverObject = comServer.createInstance();

	OPCServer server = new OPCServer(serverObject);

	/**
	 * 添加一个Group的信息
	 */
	OPCGroupStateMgt group = server.addGroup("test", true, 100, 1234, 60,
			0.0f, 1033);

	testItems(server, group, new String[] { "Saw-toothed Waves.Int2",
			"Saw-toothed Waves.test2" });

	// clean up
	server.removeGroup(group, true);
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:31,代码来源:DCOMTest4.java


示例5: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	JISystem.setAutoRegisteration(true);

	/**
	 * Session获取
	 */
	JISession _session = JISession.createSession(
			getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
			getEntryValue(CONFIG_PASSWORD));

	final JIComServer comServer = new JIComServer(
			JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
			getEntryValue(CONFIG_HOST), _session);

	final IJIComObject serverObject = comServer.createInstance();

	OPCServer server = new OPCServer(serverObject);
	final OPCBrowseServerAddressSpace serverBrowser = server.getBrowser();

	/**
	 * Flat形式获取所有Item信息
	 */
	browseFlat(serverBrowser);

	/**
	 * 获取所有的Group和Item信息
	 */
	browseTree(serverBrowser);

}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:31,代码来源:DCOMTest2.java


示例6: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	JISystem.setAutoRegisteration(true);

	/**
	 * Session获取
	 */
	JISession _session = JISession.createSession(
			getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
			getEntryValue(CONFIG_PASSWORD));

	final JIComServer comServer = new JIComServer(
			JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
			getEntryValue(CONFIG_HOST), _session);

	final IJIComObject serverObject = comServer.createInstance();

	OPCServer server = new OPCServer(serverObject);

	/**
	 * 添加一个Group的信息
	 */
	OPCGroupStateMgt group = server.addGroup("test", true, 100, 1234, 60,
			0.0f, 1033);

	final OPCItemIO itemIO = server.getItemIOService();
	queryItems(itemIO, "Saw-toothed Waves.Int1");

	// clean up
	server.removeGroup(group, true);
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:31,代码来源:DCOMTest6.java


示例7: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	JISystem.setAutoRegisteration(true);

	/**
	 * Session获取
	 */
	JISession _session = JISession.createSession(
			getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
			getEntryValue(CONFIG_PASSWORD));

	final JIComServer comServer = new JIComServer(
			JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
			getEntryValue(CONFIG_HOST), _session);

	final IJIComObject serverObject = comServer.createInstance();

	OPCServer server = new OPCServer(serverObject);

	/**
	 * 添加一个Group的信息
	 */
	OPCGroupStateMgt group = server.addGroup("test", true, 100, 1234, 60,
			0.0f, 1033);

	final OPCItemProperties itemProperties = server
			.getItemPropertiesService();
	dumpItemProperties(itemProperties, "Saw-toothed Waves.Int");

	// clean up
	server.removeGroup(group, true);
	LOGGER.info("test");
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:33,代码来源:DCOMTest5.java


示例8: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
	JISystem.setAutoRegisteration(true);

	/**
	 * Session获取
	 */
	JISession _session = JISession.createSession(
			getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
			getEntryValue(CONFIG_PASSWORD));

	final JIComServer comServer = new JIComServer(
			JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
			getEntryValue(CONFIG_HOST), _session);

	final IJIComObject serverObject = comServer.createInstance();

	OPCServer server = new OPCServer(serverObject);

	/**
	 * 添加一个Group的信息
	 */
	OPCGroupStateMgt group = server.addGroup("test", true, 100, 1234, 60,
			0.0f, 1033);

	enumerateGroups(server, OPCENUMSCOPE.OPC_ENUM_PUBLIC);
	enumerateGroups(server, OPCENUMSCOPE.OPC_ENUM_PRIVATE);
	enumerateGroups(server, OPCENUMSCOPE.OPC_ENUM_ALL);

	// clean up
	server.removeGroup(group, true);
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:32,代码来源:DCOMTest3.java


示例9: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {

		JISystem.setAutoRegisteration(true);

		/**
		 * Session获取
		 */
		JISession _session = JISession.createSession(
				getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
				getEntryValue(CONFIG_PASSWORD));

		final JIComServer comServer = new JIComServer(
				JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
				getEntryValue(CONFIG_HOST), _session);

		final IJIComObject serverObject = comServer.createInstance();

		OPCServer server = new OPCServer(serverObject);

		/**
		 * 添加一个Group的信息
		 */
		OPCGroupStateMgt group = server.addGroup("test", true, 100, 1234, 60,
				0.0f, 1033);

		testItems(group, new String[] { "Saw-toothed Waves.Int2" });

		// clean up
		server.removeGroup(group, true);

	}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:32,代码来源:DCOMTest7.java


示例10: MSWMI2

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public MSWMI2(String address, String[] args) throws JIException, UnknownHostException
	{
		this.address = address;
		session = JISession.createSession(args[1],args[2],args[3]);
//		session.useSessionSecurity(true);
//		session.setGlobalSocketTimeout(5000);
		comStub = new JIComServer(JIClsid.valueOf("76a64158-cb41-11d1-8b02-00600806d9b6"),address,session);
		IJIComObject unknown = comStub.createInstance();
		comObject = (IJIComObject)unknown.queryInterface("76A6415B-CB41-11d1-8B02-00600806D9B6");//ISWbemLocator
		//This will obtain the dispatch interface
		dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID));
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:13,代码来源:MSWMI2.java


示例11: MSSysInfo

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
MSSysInfo(String[] args) throws JIException, UnknownHostException
{
	session = JISession.createSession(args[1],args[2],args[3]);
	session.useSessionSecurity(true);
	JIComServer comServer = new JIComServer(JIProgId.valueOf("SYSINFO.SysInfo"),args[0],session);
	sysInfoServer = comServer.createInstance();
	sysInfoObject = (IJIComObject)sysInfoServer.queryInterface("6FBA474C-43AC-11CE-9A0E-00AA0062BB4C");
	dispatch = (IJIDispatch)JIObjectFactory.narrowObject(sysInfoObject.queryInterface(IJIDispatch.IID));

}
 
开发者ID:howie,项目名称:jinterop,代码行数:11,代码来源:MSSysInfo.java


示例12: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) {

		try {

				if (args.length < 4)
			    {
			    	System.out.println("Please provide address domain username password");
			    	return;
			    }
				JISystem.setInBuiltLogHandler(false);
				JISystem.setAutoRegisteration(true);
				for (int i=0;i<10000;++i)
				{

					JISession session = JISession.createSession(args[1],args[2],args[3]);
					JIComServer comServer = new JIComServer(JIProgId.valueOf("MSMQ.MSMQQueueInfo"),args[0],session);
					IJIComObject unknown = comServer.createInstance();
					IJIDispatch dispatch = (IJIDispatch)JIObjectFactory.narrowObject(unknown.queryInterface(IJIDispatch.IID));
					//JISession.destroySession(session);
					Thread.sleep(150);
					if(i%100 == 0)
					{
						System.out.println(new String().valueOf(i));
					}
					System.gc();
				}

		} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:33,代码来源:Test10KServer.java


示例13: MSEnumVariant

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public MSEnumVariant(String address,String[] args) throws JIException, UnknownHostException
{
	session = JISession.createSession(args[1],args[2],args[3]);
	comServer = new JIComServer(JIProgId.valueOf("StdCollection.VBCollection"),address,session);
	IJIComObject object = comServer.createInstance();
	dispatch = (IJIDispatch)JIObjectFactory.narrowObject(object.queryInterface(IJIDispatch.IID));

}
 
开发者ID:howie,项目名称:jinterop,代码行数:9,代码来源:MSEnumVariant.java


示例14: MSWMI

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public MSWMI(String address, String[] args) throws JIException, UnknownHostException
{
	this.address = address;
	session = JISession.createSession(args[1],args[2],args[3]);
	session.useSessionSecurity(true);
	session.setGlobalSocketTimeout(5000);
	comStub = new JIComServer(JIProgId.valueOf("WbemScripting.SWbemLocator"),address,session);
	IJIComObject unknown = comStub.createInstance();
	comObject = (IJIComObject)unknown.queryInterface("76A6415B-CB41-11d1-8B02-00600806D9B6");//ISWbemLocator
	//This will obtain the dispatch interface
	dispatch = (IJIDispatch)JIObjectFactory.narrowObject(comObject.queryInterface(IJIDispatch.IID));
}
 
开发者ID:howie,项目名称:jinterop,代码行数:13,代码来源:MSWMI.java


示例15: SampleTestServer

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public SampleTestServer(String address, String[] args) throws JIException, UnknownHostException {
  this.address = address;
  session = JISession.createSession(args[1], args[2], args[3]);
  comStub = new JIComServer(JIProgId.valueOf("SampleTestServer.TestServer"), address, session);
  IJIComObject unknown = comStub.createInstance();
  comObject = (IJIComObject) unknown.queryInterface("1F438B1C-02BA-462E-A971-8E0640C141E5"); //ITestServer
}
 
开发者ID:howie,项目名称:jinterop,代码行数:8,代码来源:SampleTestServer.java


示例16: FirstContact_Stub

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public FirstContact_Stub(String address) throws Exception
{
	JIArray arry123 = new JIArray(new Byte[10][0],true);
	JIStruct struct123 = new JIStruct();
	struct123.addMember(arry123);
	struct123.addMember(0,new Integer(1));
	struct123.addMember(0,new JIPointer(arry123));

	//JIArray array = new JIArray(new short[]{0});
	JISystem.setAutoRegisteration(true);
	JISystem.setInBuiltLogHandler(false);
	//Config.setProperty("jcifs.smb.client.domain","ITLINFOSYS");
	 session = JISession.createSession("FDGNT","roopchand","QweQwe007");
	 //session = JISession.createSession("10.74.85.56","itl-hw-38602a\\Vikram","[email protected]");
	//session = JISession.createSession("federation","administrator","enterprise");
	//stub = new JIComServer(JIClsid.valueOf("8B21775E-717D-11CE-AB5B-D41203C10000"),address,session);
	//stub = new JIComServer(JIProgId.valueOf(session,"TestCOM123.TestServer2"),address,session);
	//stub = new JIComServer(JIProgId.valueOf(session,"VirtualServer.Application"),address,session);

	// stub = new JIComServer(JIProgId.valueOf(session,"ArrayTry.myarray"),address,session);
	stub = new JIComServer(JIProgId.valueOf("ATLDemo.TestSafeArray"),address,session);
	//stub = new JIComServer(JIProgId.valueOf(session,"SafeArrayDemo.SafeArrayTest"),address,session);
	 //stub = new JIComServer(JIProgId.valueOf(session,"Project1.Class1"),address,session);
	 //stub = new JIComServer(JIProgId.valueOf(session,"TLI.TLIApplication"),address,session);

	 //stub = new JIComServer(JIProgId.valueOf(session,"TestSinglePtr.TestSinglePtr2"),address,session);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:28,代码来源:FirstContact_Stub.java


示例17: MSInternetExplorer

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public MSInternetExplorer(String address, String[] args) throws JIException, UnknownHostException
{
	JISystem.mapHostNametoIP("locutus", "192.168.0.130");
	session = JISession.createSession(args[1],args[2],args[3]);
	session.useNTLMv2(true);
	session.useSessionSecurity(true);
	comServer = new JIComServer(JIProgId.valueOf("InternetExplorer.Application"),address,session);
	ieObject = comServer.createInstance();
	IJIComObject ieObjectWebBrowser2 = (IJIComObject)ieObject.queryInterface("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E");
	ieObjectDispatch = (IJIDispatch)JIObjectFactory.narrowObject((IJIComObject)ieObject.queryInterface(IJIDispatch.IID));

}
 
开发者ID:howie,项目名称:jinterop,代码行数:13,代码来源:MSInternetExplorer.java


示例18: TestCOMServer

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public TestCOMServer(String address, String[] args) throws JIException, UnknownHostException
{
	JISession session = JISession.createSession(args[1],args[2],args[3]);


	//instead of this the ProgID "TestCOMServer.ITestCOMServer"	can be used as well.
	//comStub = new JIComServer(JIProgId.valueOf(session,"TestCOMServer.ITestCOMServer"),address,session);
	//CLSID of ITestCOMServer
	comStub = new JIComServer(JIClsid.valueOf("44A9CD09-0D9B-4FD2-9B8A-0151F2E0CAD1"),address,session);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:11,代码来源:TestCOMServer.java


示例19: main

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {

		JISystem.setAutoRegisteration(true);

		JISession _session = JISession.createSession(
				getEntryValue(CONFIG_DOMAIN), getEntryValue(CONFIG_USERNAME),
				getEntryValue(CONFIG_PASSWORD));

		final JIComServer comServer = new JIComServer(
				JIClsid.valueOf(getEntryValue(CONFIG_CLSID)),
				getEntryValue(CONFIG_HOST), _session);

		final IJIComObject serverObject = comServer.createInstance();

		OPCServer server = new OPCServer(serverObject);

		dumpServerStatus(server);

	}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:20,代码来源:DCOMTest1.java


示例20: MSExcel2

import org.jinterop.dcom.core.JIComServer; //导入依赖的package包/类
public MSExcel2(String address, String[] args) throws JIException, UnknownHostException
	{
		session = JISession.createSession(args[1],args[2],args[3]);
//		session.useSessionSecurity(true);
		comServer = new JIComServer(JIProgId.valueOf("Excel.Application"),address,session);
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:7,代码来源:MSExcel2.java



注:本文中的org.jinterop.dcom.core.JIComServer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WhiteListPolicy类代码示例发布时间:2022-05-22
下一篇:
Java BlobOutputStream类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap