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

Java JISystem类代码示例

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

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



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

示例1: close

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/**
 * @see rpc.Transport#close()
 */
public void close() throws IOException
{
    try
    {
        if (channelWrapper != null)
        {
            if (JISystem.getLogger().isLoggable(Level.FINEST))
            {
                JISystem.getLogger().finest("Closing " + channelWrapper);
            }
            channelWrapper.close();
        }
    }
    finally
    {
        attached = false;
        channelWrapper = null;
    }
}
 
开发者ID:howie,项目名称:jinterop,代码行数:23,代码来源:JIComTransport.java


示例2: run

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/**
 * @see java.lang.Runnable#run()
 */
public void run()
{
    try
    {
        while (true)
        {
            if (Thread.currentThread().isInterrupted())
            {
                JISystem.getLogger().log(Level.INFO,
                        "Selector manager interrupted");
                return;
            }

            doInvocations();

            doSelect();
        }
    }
    catch (Exception t)
    {
        cleanup();
        getLogger().log(Level.SEVERE,
                "Selector manager is unexpectedly exiting", t);
    }
}
 
开发者ID:howie,项目名称:jinterop,代码行数:29,代码来源:SelectorManager.java


示例3: attach

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public Endpoint attach(PresentationSyntax syntax) throws IOException {
    if (attached) throw new RpcException("Transport already attached.");

    Endpoint endPoint = null;
    try {
        socket = (Socket)JISystem.internal_getSocket();
        output = null;
        input = null;
        attached = true;
        endPoint = new JIComRuntimeEndpoint(this, syntax);
    } catch (Exception ex) {
        try {
            close();
        } catch (Exception ignore) { }
    }
    return endPoint;
}
 
开发者ID:howie,项目名称:jinterop,代码行数:18,代码来源:JIComRuntimeTransport.java


示例4: getDllEntry

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public Object[] getDllEntry(int memberId, int invKind) throws JIException
{
	if (invKind != InvokeKind.INVOKE_FUNC.intValue() && invKind != InvokeKind.INVOKE_PROPERTYGET.intValue()
			&& invKind != InvokeKind.INVOKE_PROPERTYPUTREF.intValue() && invKind != InvokeKind.INVOKE_PROPERTYPUT.intValue())
	{
		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.E_INVALIDARG));
	}

	JICallBuilder callObject = new JICallBuilder(true);
	callObject.addInParamAsInt(memberId,JIFlags.FLAG_NULL);
	callObject.addInParamAsInt(invKind,JIFlags.FLAG_NULL);
	callObject.addInParamAsInt(1,JIFlags.FLAG_NULL);//refPtrFlags , as per the oaidl.idl...
	callObject.addOutParamAsObject(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_BSTR),JIFlags.FLAG_NULL);
	callObject.addOutParamAsObject(new JIString(JIFlags.FLAG_REPRESENTATION_STRING_BSTR),JIFlags.FLAG_NULL);
	callObject.addOutParamAsObject(Short.class,JIFlags.FLAG_NULL);
	callObject.setOpnum(10);
	return comObject.call(callObject);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:19,代码来源:JITypeInfoImpl.java


示例5: callMethodA

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public JIVariant[] callMethodA(String name, Object[] inparams, String[] paramNames) throws JIException
{
	if (inparams == null || inparams.length == 0)
	{
		return callMethodA(getIDsOfNames(name),inparams);
	}

	if (paramNames == null || paramNames.length != inparams.length)
	{
		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_DISP_INCORRECT_PARAM_LENGTH));
	}

	String[] names = new String[paramNames.length + 1];
	names[0] = name;
	System.arraycopy(paramNames,0,names,1,paramNames.length);
	int[] dispIds = getIDsOfNames(names);

	int[] newDispIds = new int[dispIds.length - 1];

	for (int i = 0; i < newDispIds.length; i++)
	{
		newDispIds[i] = dispIds[i + 1]; //skip the apiname
	}

	return callMethodA(dispIds[0],inparams,newDispIds);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:27,代码来源:JIDispatchImpl.java


示例6: main

import org.jinterop.dcom.common.JISystem; //导入依赖的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.getLogger().setLevel(Level.FINEST);
				JISystem.setAutoRegisteration(true);
				MSWMI2 test = new MSWMI2(args[0],args);
				for (int i = 0 ; i < 2; i++)
				{
					System.out.println("Index i: " + i);
					test.performOp();
				}
				test.killme();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:25,代码来源:MSWMI2.java


示例7: main

import org.jinterop.dcom.common.JISystem; //导入依赖的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<100; i++){
              System.out.println("**********************Invoking callback sequence....\n");
              testStaticUpdateMeSink(args);
              Thread.sleep(12000);
            }
//            testSinkDebug(args);
          }
          catch (Exception e) {
            e.printStackTrace();
          }
        }
 
开发者ID:howie,项目名称:jinterop,代码行数:20,代码来源:SampleTestServerCallback.java


示例8: main

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

		try{
		    if (args.length < 4)
		    {
		    	System.out.println("Please provide address domain username password");
		    	return;
		    }
		    JISystem.setAutoRegisteration(true);
			MSEnumVariant enumVariant = new MSEnumVariant(args[0],args);
			enumVariant.performOp();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:18,代码来源:MSEnumVariant.java


示例9: main

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

		try {
				if (args.length < 4)
			    {
			    	System.out.println("Please provide address domain username password");
			    	return;
			    }

				JISystem.getLogger().setLevel(Level.INFO);
				JISystem.setInBuiltLogHandler(false);
				JISystem.setAutoRegisteration(true);
				MSWMI test = new MSWMI(args[0],args);
				for (int i = 0 ; i < 100; i++)
				{
					System.out.println("Index i: " + i);
					test.performOp();
				}
				test.killme();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	}
 
开发者ID:howie,项目名称:jinterop,代码行数:25,代码来源:MSWMI.java


示例10: main

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public static void main(String[] args) {
	try {
		if (args.length < 5)
	    {
	    	System.out.println("Please provide address domain username password progIdOfApplication");
	    	return;
	    }
		JISystem.getLogger().setLevel(Level.OFF);
		JISystem.setInBuiltLogHandler(false);
		MSTypeLibraryBrowser2 typeLibraryBrowser = new MSTypeLibraryBrowser2(args[0],args);
		typeLibraryBrowser.start();
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}

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


示例11: JIComServer

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/** <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);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:31,代码来源:JIComServer.java


示例12: main

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

		try {
			if (args.length < 4) {
				System.out.println("Please provide address domain username password");
				return;
			}

			JISystem.getLogger().setLevel(Level.INFO);
			JISystem.setInBuiltLogHandler(false);
			MSWord test = new MSWord(args[0], args);
			test.startWord();
			test.showWord();

//			for (int i = 0; i < 10; i++) {
				test.performOp();
//			}

			test.quitAndDestroy();

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


示例13: call

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public byte[] call(boolean isSimplePing,byte[] setId,ArrayList listOfAdds,ArrayList listOfDels, int seqNum)
{
	PingObject pingObject = new PingObject();
	pingObject.setId = setId;
	pingObject.listOfAdds = listOfAdds;
	pingObject.listOfDels = listOfDels;
	pingObject.seqNum = seqNum;
	
	if (isSimplePing)
	{
		pingObject.opnum = 1;
	}
	else
	{
		pingObject.opnum = 2;
	}
	
	try {
		call(Endpoint.IDEMPOTENT,pingObject);
	} catch (IOException e) {
		JISystem.getLogger().throwing("JIComOxidStub","call",e);  
	}

	//returns setId.
	return pingObject.setId;
}
 
开发者ID:howie,项目名称:jinterop,代码行数:27,代码来源:JIComOxidStub.java


示例14: addMethodDescriptor

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/**Adds a Method Descriptor. Methods <b>must</b> be added in the same order as they appear in the IDL.
 *
 * <p> Please note that overloaded methods are not allowed.
 * @param methodDescriptor
 * @throws IllegalArgumentException if a method by the same name already exists.
 */
public void addMethodDescriptor(JILocalMethodDescriptor methodDescriptor)
{
	if (nameVsMethodInfo.containsKey(methodDescriptor.getMethodName()))
	{
		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_CALLBACK_OVERLOADS_NOTALLOWED));
	}

	methodDescriptor.setMethodNum(nextNum);
	nextNum++;

	opnumVsMethodInfo.put(new Integer(methodDescriptor.getMethodNum()),methodDescriptor);
	if (dispInterface)
	{
		if (methodDescriptor.getMethodDispID() == -1)
		{
			throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_METHODDESC_DISPID_MISSING));
		}
		dispIdVsMethodInfo.put(new Integer(methodDescriptor.getMethodDispID()),methodDescriptor);
	}

	nameVsMethodInfo.put(methodDescriptor.getMethodName(),methodDescriptor);


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


示例15: addMember

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/** Adds a member to this Union. The <code>member</code> is distinguished using the <code>discriminant</code>. <br>
 *
 * @param discriminant
 * @param member
 * @throws JIException
 * @throws IllegalArgumentException if any parameter is <code>null</code>
 */
public void addMember(Object discriminant, Object member) throws JIException
{
	if (discriminant == null || member == null)
	{
		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_UNION_NULL_DISCRMINANT));
	}

	if (!discriminant.getClass().equals(discriminantClass))
	{
		throw new JIException(JIErrorCodes.JI_UNION_DISCRMINANT_MISMATCH);
	}

	if (member.getClass().equals(JIPointer.class) && !((JIPointer)member).isReference())
	{
		((JIPointer)member).setDeffered(true);
	}
	else
	if (member.getClass().equals(JIString.class))
	{
		((JIString)member).setDeffered(true);
	}

	dsVsMember.put(discriminant,member);
}
 
开发者ID:howie,项目名称:jinterop,代码行数:32,代码来源:JIUnion.java


示例16: getLengthInBytes

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
static int getLengthInBytes(Class c,Object obj, int FLAG)
{
	if(obj != null && obj.getClass().equals(JIArray.class))
	{
		return ((JIArray)obj).getSizeOfAllElementsInBytes();
	}
	else
	{
		if ((c != IJIComObject.class || c != IJIDispatch.class) && obj instanceof IJIComObject)
		{
			c = IJIComObject.class;
		}

		if (((SerializerDeserializer)mapOfSerializers.get(c)) == null)
		{
			throw new IllegalStateException(MessageFormat.format(JISystem.getLocalizedMessage(JIErrorCodes.JI_UTIL_SERDESER_NOT_FOUND),new String[]{c.toString()}));
		}
		return ((SerializerDeserializer)mapOfSerializers.get(c)).getLengthInBytes(obj,FLAG);
	}

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


示例17: releaseLocalComponent

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
static void releaseLocalComponent(JISession session, JILocalCoClass component)
{
    synchronized (mutex2) {
        if (JISystem.getLogger().isLoggable(Level.INFO))
            {
                JISystem.getLogger().info("releaseLocalComponent: " + component.getCoClassIID());
            }
        
        JIComOxidDetails details = (JIComOxidDetails)mapOfJavaVsOxidDetails.get(component);
        mapOfOIDVsComponents.remove(details.getOid());
        mapOfOxidVsOxidDetails.remove(details.getOxid());
        mapOfIPIDVsComponent.remove(details.getIpid());
        mapOfJavaVsOxidDetails.remove(component);
        listOfExportedJavaComponents.remove(component);
        mapOfSessionIdsVsOIDs.remove(new Integer(session.getSessionIdentifier()));
        
        //the thread associated with this will also stop.
        details.interruptRemUnknownThreadGroup();
		
        component = null;
        details = null;
    }
}
 
开发者ID:howie,项目名称:jinterop,代码行数:24,代码来源:JIComOxidRuntime.java


示例18: detachEventHandler

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/**
   * @exclude
   * @param comObject
   * @param identifier
   * @throws JIException
   */
  public static void detachEventHandler(IJIComObject comObject, String identifier) throws JIException
  {
  	Object[] connectionInfo = comObject.internal_getConnectionInfo(identifier);
if (connectionInfo == null)
{
	throw new JIException(JIErrorCodes.JI_CALLBACK_INVALID_ID);
}

if (JISystem.getLogger().isLoggable(Level.INFO))
{
	JISystem.getLogger().info("Detaching event handler for  comObject: " + comObject.getInterfaceIdentifier() + " , identifier: " + identifier);
}

IJIComObject connectionPointer = (IJIComObject)connectionInfo[0];

//first use the cookie to detach.
JICallBuilder object = new JICallBuilder(true);
object.setOpnum(3);
object.addInParamAsInt(((Integer)connectionInfo[1]).intValue(),JIFlags.FLAG_NULL);
connectionPointer.call(object);
//now release the connectionPointer.
connectionPointer.release();
  }
 
开发者ID:howie,项目名称:jinterop,代码行数:30,代码来源:JIFrameworkHelper.java


示例19: run

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
public void run() {
	int i = 0;
	while(i < listOfSessions.size())
	{
		JISession session  = (JISession)(listOfSessions.get(i));
		try {
			JISession.destroySession(session);
		} catch (JIException e) {
			JISystem.getLogger().throwing("JISession","addShutDownHook Thread:run()",e);
		}
		i++;
	}
	JISystem.internal_writeProgIdsToFile();
	JIComOxidRuntime.stopResolver();
	releaseRefsTimer.cancel();
	mapOfSessionIdsVsSessions.clear();
	mapOfObjects.clear();
	listOfSessions.clear();
}
 
开发者ID:howie,项目名称:jinterop,代码行数:20,代码来源:JISession.java


示例20: createSession

import org.jinterop.dcom.common.JISystem; //导入依赖的package包/类
/** <b>Native</b> Single Sign On capable session. 
 * 
 *  <b>Warning:</b> <ul><li>This method works <b>only</b> on Microsoft Windows Platform.</li>
 *  <li>It does <b>not</b> support NTLMv2 or NTLM1 Session Security.</li>
 *  <li>It supports only NTLM1 Authentication.</li>
 *  <li>This session <b>cannot</b> be used with <code>JIComServer(ProgId,...)</code> ctors. JCIFS will
 *  fail to setup a connection with Windows Registry if GUEST account is disabled.</li></ul> 
 * 
 * @return
 * @see JIComServer#JIComServer(JIClsid, JISession)
 * @see JIComServer#JIComServer(JIProgId, JISession)
 */
public static JISession createSession()
{
   	if (!System.getProperty("os.name").toLowerCase().startsWith("windows"))
   	{
   		throw new IllegalArgumentException(JISystem.getLocalizedMessage(JIErrorCodes.JI_WIN_ONLY));
   	}
   	
   	JISession session = new JISession();
	session.sessionIdentifier =  new Object().hashCode() ^ (int)Runtime.getRuntime().freeMemory() ^ randomGen.nextInt();
	session.isSSO = true;

	synchronized (mutex) {
		mapOfSessionIdsVsSessions.put(new Integer(session.sessionIdentifier),session);
		listOfSessions.add(session);
	}

	if (JISystem.getLogger().isLoggable(Level.INFO))
	{
		JISystem.getLogger().info("Created Session for SSO: " + session.sessionIdentifier);
	}

	return session;
}
 
开发者ID:howie,项目名称:jinterop,代码行数:36,代码来源:JISession.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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