当前位置: 首页>>代码示例>>Java>>正文


Java JIException.printStackTrace方法代码示例

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


在下文中一共展示了JIException.printStackTrace方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getCustomHeader

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getCustomHeader()
{
	JIStruct struct = _getCustomHeader();
	NetworkDataRepresentation ndr = new NetworkDataRepresentation();
	ndr.setBuffer(new NdrBuffer(new byte[512], 0));
	int lenOfStruct = getLengthOfStruct(struct);
	struct = _getCustomHeader();
	int len = addCommonTypeHeaderAndEncode(ndr, struct, lenOfStruct);
	//now we read the length to put into this struct
	ndr.getBuffer().setIndex(8);
	//int len = ndr.readUnsignedLong() + 16; //8 for common type header and (4 + 4) for header length and reserved.
	struct = _getCustomHeader();
	struct.removeMember(1);
	try {
		struct.addMember(1, new Integer(len)); //will push Reserved to the next place now.
	} catch (JIException e) {
		e.printStackTrace();
	}
	
	return struct;
}
 
开发者ID:howie,项目名称:jinterop,代码行数:22,代码来源:JIRemoteSCMActivator.java

示例2: getServerLocationInfo

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getServerLocationInfo()
		{
			/**
			 * typedef struct tagLocationInfoData {
[string] wchar_t* machineName;
DWORD processId;
DWORD apartmentId;
DWORD contextId;
} LocationInfoData;
			 */
			JIStruct struct = new JIStruct();
			try {
				
				struct.addMember(new Integer(0));
				struct.addMember(new Integer(0));
				struct.addMember(new Integer(0));
				struct.addMember(new Integer(0));
				
			} catch (JIException e) {
				e.printStackTrace();
			}
		
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:25,代码来源:JIRemoteSCMActivator.java

示例3: getInstantiationInfoData

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getInstantiationInfoData()
		{
			JIStruct struct = _getInstantiationInfoData();
			int lenOfStruct = getLengthOfStruct(struct);
			struct = _getInstantiationInfoData();
			NetworkDataRepresentation ndr = new NetworkDataRepresentation();
			ndr.setBuffer(new NdrBuffer(new byte[512], 0));
			int len = addCommonTypeHeaderAndEncode(ndr, struct, lenOfStruct);
			//now we read the length to put into this struct
//			ndr.getBuffer().setIndex(8);
//			int len = ndr.readUnsignedLong();
			struct = _getInstantiationInfoData();
			struct.removeMember(7);
			try {
				struct.addMember(7, new Integer(len)); //will push COMVERSION to last place now.
			} catch (JIException e) {
				e.printStackTrace();
			}
			
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:22,代码来源:JIRemoteSCMActivator.java

示例4: main

import org.jinterop.dcom.common.JIException; //导入方法依赖的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

示例5: changed

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
public void changed ( final Item item, final ItemState itemState )
{
    System.out.println ( String.format ( "Item: %s, Value: %s, Timestamp: %tc, Quality: %d", item.getId (), itemState.getValue (), itemState.getTimestamp (), itemState.getQuality () ) );

    try
    {
        VariantDumper.dumpValue ( "\t", itemState.getValue () );
    }
    catch ( final JIException e )
    {
        e.printStackTrace ();
    }

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

示例6: getSecurityInfoData

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getSecurityInfoData()
		{
			/**
			 * typedef struct tagSecurityInfoData {
DWORD dwAuthnFlags;
COSERVERINFO* pServerInfo;
DWORD* pdwReserved;
} SecurityInfoData
			 */
			
			JIStruct struct = new JIStruct();
			try {
				struct.addMember(new Integer(0));
				
				/**
				 * typedef struct _COSERVERINFO {
DWORD dwReserved1;
[string] wchar_t* pwszName;
DWORD* pdwReserved;
DWORD dwReserved2;
} COSERVERINFO;
				 */
				JIStruct coserver = new JIStruct();
				coserver.addMember(new Integer(0));
				coserver.addMember(new JIPointer(new JIString(targetServer, JIFlags.FLAG_REPRESENTATION_STRING_LPWSTR)));
				coserver.addMember(new Integer(0));
				coserver.addMember(new Integer(0));
				struct.addMember(new JIPointer(coserver));
				struct.addMember(new Integer(0));
			} catch (JIException e) {
				e.printStackTrace();
			}
			
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:36,代码来源:JIRemoteSCMActivator.java

示例7: getScmRequestInfoData

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getScmRequestInfoData()
		{
			/**
			 * typedef struct tagScmRequestInfoData {
DWORD* pdwReserved;
customREMOTE_REQUEST_SCM_INFO* remoteRequest;
} ScmRequestInfoData
			 */
			JIStruct struct = new JIStruct();
			try {
				
				struct.addMember(new Integer(0));
				
				/**
				 * typedef struct _customREMOTE_REQUEST_SCM_INFO {
DWORD ClientImpLevel;
[range(0, MAX_REQUESTED_PROTSEQS)]
unsigned short cRequestedProtseqs;
[size_is(cRequestedProtseqs)] unsigned short* pRequestedProtseqs;
} customREMOTE_REQUEST_SCM_INFO;
				 */
				JIStruct _customRemoteRequestSCMInfo = new JIStruct();
				_customRemoteRequestSCMInfo.addMember(new Integer(2));
				_customRemoteRequestSCMInfo.addMember(new Short((short)1));
				_customRemoteRequestSCMInfo.addMember(new JIPointer(new JIArray(new Short[]{(short)0x07}, true)));
				struct.addMember(new JIPointer(_customRemoteRequestSCMInfo));
				
			} catch (JIException e) {
				e.printStackTrace();
			}
		
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:34,代码来源:JIRemoteSCMActivator.java

示例8: main

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
public static void main ( final String[] args ) throws Throwable
{
    // create connection information
    final ConnectionInformation ci = new ConnectionInformation ();
    ci.setHost ( args[0] );
    ci.setDomain ( args[1] );
    ci.setUser ( args[2] );
    ci.setPassword ( args[3] );
    ci.setClsid ( args[4] );

    // create a new server
    final Server server = new Server ( ci, Executors.newSingleThreadScheduledExecutor () );
    try
    {
        // connect to server
        server.connect ();

        // browse flat
        final BaseBrowser flatBrowser = server.getFlatBrowser ();
        if ( flatBrowser != null )
        {
            for ( final String item : server.getFlatBrowser ().browse ( "" ) )
            {
                System.out.println ( item );
            }
        }

        // browse tree
        final TreeBrowser treeBrowser = server.getTreeBrowser ();
        if ( treeBrowser != null )
        {
            dumpTree ( treeBrowser.browse (), 0 );
        }

        // browse tree manually
        browseTree ( "", treeBrowser, new Branch () );
    }
    catch ( final JIException e )
    {
        e.printStackTrace ();
        System.out.println ( String.format ( "%08X: %s", e.getErrorCode (), server.getErrorMessage ( e.getErrorCode () ) ) );
    }
}
 
开发者ID:luoyan35714,项目名称:OPC_Client,代码行数:44,代码来源:OPCTest3.java

示例9: _getInstantiationInfoData

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct _getInstantiationInfoData()
		{
			/**
			 * typedef struct tagInstantiationInfoData {
CLSID classId;
DWORD classCtx;
DWORD actvflags;
long fIsSurrogate;
[range(1, MAX_REQUESTED_INTERFACES)]
DWORD cIID;
DWORD instFlag;
[size_is(cIID)] IID* pIID;
DWORD thisSize;
COMVERSION clientCOMVersion;
} InstantiationInfoData
			 * */
			
			JIStruct struct = new JIStruct();
			try {
				
				struct.addMember(new UUID(targetClsid));
				struct.addMember(new Integer(0x14));//  CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_INPROC_SERVER16 
				struct.addMember(new Integer(0));
				struct.addMember(new Integer(0));
				struct.addMember(new Integer(2)); //IUnknown and IDispatch
				struct.addMember(new Integer(0));
				JIPointer ptr = new JIPointer(new JIArray(new UUID[]{new UUID("00000000-0000-0000-c000-000000000046"),
				new UUID("00020400-0000-0000-c000-000000000046"), }, true));
				ptr.setFlags(JIFlags.FLAG_REPRESENTATION_ARRAY);
				struct.addMember(ptr);
				
				//size of the current struct , why ? why ???
				struct.addMember(new Integer(0));//don't know will replace later on. (remove and add)
				struct.addMember(Short.valueOf((short)JISystem.getCOMVersion().getMajorVersion()));
				struct.addMember(Short.valueOf((short)JISystem.getCOMVersion().getMinorVersion()));
				
			} catch (JIException e) {
				e.printStackTrace();
			} //
			
			
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:44,代码来源:JIRemoteSCMActivator.java

示例10: getSpecialPropertyData

import org.jinterop.dcom.common.JIException; //导入方法依赖的package包/类
private JIStruct getSpecialPropertyData()
		{
			/**
			 * typedef struct tagSpecialPropertiesData {
unsigned long dwSessionId;
long fRemoteThisSessionId;
long fClientImpersonating;
long fPartitionIDPresent;
DWORD dwDefaultAuthnLvl;
GUID guidPartition;
DWORD dwPRTFlags;
DWORD dwOrigClsctx;
DWORD dwFlags;
DWORD Reserved1;
unsigned __int64 Reserved2;
DWORD Reserved3[5];
} SpecialPropertiesData;
			 */
			
			JIStruct struct = new JIStruct();
			try {
				struct.addMember(new Integer(0xFFFFFFFF));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000001)); //auth level none ? Why ?
				struct.addMember(new UUID(UUID.NIL_UUID));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x14));
				struct.addMember(new Integer(0x2));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Long(0x0000000000000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
				struct.addMember(new Integer(0x00000000));
			} catch (JIException e) {
				e.printStackTrace();
			} //
			
			return struct;
		}
 
开发者ID:howie,项目名称:jinterop,代码行数:44,代码来源:JIRemoteSCMActivator.java


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