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


Java NamedValue.value方法代码示例

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


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

示例1: result

import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
/**
 * See RequestInfoImpl for javadoc.
 */
public Any result (){
    checkAccess( MID_RESULT );

    if( cachedResult == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported5() ;
        }
        // Get the result from the DII request data.
        NamedValue nvResult = request.result( );

        if( nvResult == null ) {
            throw wrapper.piDiiResultIsNull() ;
        }

        cachedResult = nvResult.value();
    }

    // Good citizen: In the interest of efficiency, we assume that
    // interceptors will not modify the contents of the result Any.
    // Otherwise, we would need to create a deep copy of the Any.

    return cachedResult;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:27,代码来源:ClientRequestInfoImpl.java

示例2: unmarshalReply

import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
public void unmarshalReply(InputStream is)
{
    // First unmarshal the return value if it is not void
    if ( _result != null ) {
        Any returnAny = _result.value();
        TypeCode returnType = returnAny.type();
        if ( returnType.kind().value() != TCKind._tk_void )
            returnAny.read_value(is, returnType);
    }

    // Now unmarshal the out/inout args
    try {
        for ( int i=0; i<_arguments.count() ; i++) {
            NamedValue nv = _arguments.item(i);
            switch( nv.flags() ) {
            case ARG_IN.value:
                break;
            case ARG_OUT.value:
            case ARG_INOUT.value:
                Any any = nv.value();
                any.read_value(is, any.type());
                break;
            }
        }
    }
    catch ( org.omg.CORBA.Bounds ex ) {
        // Cannot happen since we only iterate till _arguments.count()
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:RequestImpl.java

示例3: nvListToParameterArray

import org.omg.CORBA.NamedValue; //导入方法依赖的package包/类
/**
 * Internal utility method to convert an NVList into a PI Parameter[]
 */
protected Parameter[] nvListToParameterArray( NVList parNVList ) {

    // _REVISIT_ This utility method should probably be doing a deep
    // copy so interceptor can't accidentally change the arguments.

    int count = parNVList.count();
    Parameter[] plist = new Parameter[count];
    try {
        for( int i = 0; i < count; i++ ) {
            Parameter p = new Parameter();
            plist[i] = p;
            NamedValue nv = parNVList.item( i );
            plist[i].argument = nv.value();
            // ParameterMode spec can be found in 99-10-07.pdf
            // Section:10.5.22
            // nv.flags spec can be found in 99-10-07.pdf
            // Section 7.1.1
            // nv.flags has ARG_IN as 1, ARG_OUT as 2 and ARG_INOUT as 3
            // To convert this into enum PARAM_IN, PARAM_OUT and
            // PARAM_INOUT the value is subtracted by 1.
            plist[i].mode = ParameterMode.from_int( nv.flags() - 1 );
        }
    } catch ( Exception e ) {
        throw wrapper.exceptionInArguments( e ) ;
    }

    return plist;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:RequestInfoImpl.java


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