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


Java NamedValue类代码示例

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


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

示例1: marshalReplyParams

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
/** This is called from the ORB after the DynamicImplementation.invoke
 *  returns. Here we marshal the return value and inout/out params.
 */
public void marshalReplyParams(OutputStream os)
{
    // marshal the operation return value
    _resultAny.write_value(os);

    // marshal the inouts/outs
    NamedValue arg = null;

    for (int i=0; i < _arguments.count() ; i++) {
        try {
            arg = _arguments.item(i);
        } catch (Bounds e) {}

        if ((arg.flags() == org.omg.CORBA.ARG_OUT.value) ||
            (arg.flags() == org.omg.CORBA.ARG_INOUT.value)) {
            arg.value().write_value(os);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:ServerRequestImpl.java

示例2: 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

示例3: create_request

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
/**
 * Create the request for the local call
 */
public Request create_request(org.omg.CORBA.Object target, Context context,
                              String operation, NVList parameters,
                              NamedValue returns
                             )
{
  if (orb instanceof OrbFunctional)
    {
      ((OrbFunctional) orb).ensureRunning();
    }
  gnuRequest g = new gnuRequest();
  g.setORB(orb);
  g.setOperation(operation);
  g.setIor(ior);
  g.m_target = target;
  g.ctx(context);
  g.set_args(parameters);
  if (returns != null)
    g.set_result(returns);
  return g;
}
 
开发者ID:vilie,项目名称:javify,代码行数:24,代码来源:SimpleDelegate.java

示例4: create_request

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
/**
 * Creates the request to invoke the method on this object.
 *
 * @param target the object, for that the operation must be invoked.
 * @param context context (null allowed)
 * @param operation the method name
 * @param parameters the method parameters
 * @param returns the return value holder
 *
 * @return the created request.
 */
public Request create_request(org.omg.CORBA.Object target, Context context,
  String operation, NVList parameters, NamedValue returns
)
{
  gnuRequest request = getRequestInstance(target);

  request.setIor(getIor());
  request.set_target(target);

  request.setOperation(operation);
  request.set_args(parameters);
  request.m_context = context;
  request.set_result(returns);
  request.setORB(orb);

  return request;
}
 
开发者ID:vilie,项目名称:javify,代码行数:29,代码来源:IorDelegate.java

示例5: create_request

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
/**
 * Create the request for the local call
 */
public Request create_request(org.omg.CORBA.Object target, Context context,
                              String operation, NVList parameters,
                              NamedValue returns
                             )
{
  if (orb instanceof OrbFunctional)
    {
      ((OrbFunctional) orb).ensureRunning();
    }
  gnuRequest g = new gnuRequest();
  g.setORB(orb);
  g.setOperation(operation);
  g.setIor(ior);
  g.m_target = target;
  g.ctx(context);
  g.set_args(parameters);
  if (returns != null)
    g.set_result(returns);
  return g;    
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:24,代码来源:SimpleDelegate.java

示例6: assignOutArguments

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
public static void assignOutArguments(NVList from_list, NVList to_list,
                                      boolean wrap_anys)
{
    int length = to_list.count();

    if (length < from_list.count())
        throw new MARSHAL("Invalid number of out arguments.", 0,
                          CompletionStatus.COMPLETED_NO);

    NamedValue to_nam_val = null;

    try {
        for (int i = 0; i < length; i++) {
            to_nam_val = to_list.item(i);
            if (to_nam_val.flags() != ARG_IN.value)
                AnyImpl.assignValue(from_list.item(i).value(),
                                    to_nam_val.value(), wrap_anys);
        }

    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }
}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:25,代码来源:NVListImpl.java

示例7: assignInArguments

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
public static void assignInArguments(NVList from_list, NVList to_list,
                                     boolean wrap_anys)
{
    int length = to_list.count();

    if (length < from_list.count())
        throw new MARSHAL("Invalid number of out arguments.", 0,
                          CompletionStatus.COMPLETED_NO);

    NamedValue to_nam_val = null;

    try {
        for (int i = 0; i < length; i++) {
            to_nam_val = to_list.item(i);
            if (to_nam_val.flags() != ARG_OUT.value)
                AnyImpl.assignValue(from_list.item(i).value(),
                                    to_nam_val.value(), wrap_anys);
        }

    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }

}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:26,代码来源:NVListImpl.java

示例8: readOutParams

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
public static void readOutParams(NVList list, InputStream input)
{
    if (list == null)
        return;

    int length = list.count();

    NamedValue nam_val = null;

    try {
        for (int i = 0; i < length; i++) {
            nam_val = list.item(i);
            if (nam_val.flags() != ARG_IN.value)
                nam_val.value().read_value(input, nam_val.value().type());
        }
    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }

}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:22,代码来源:NVListImpl.java

示例9: writeOutParams

import org.omg.CORBA.NamedValue; //导入依赖的package包/类
public static void writeOutParams(NVList list, OutputStream output)
{
    if (list == null)
        return;

    int length = list.count();

    NamedValue nam_val = null;
    try {
        for (int i = 0; i < length; i++) {
            nam_val = list.item(i);
            if (nam_val.flags() != ARG_IN.value)
                nam_val.value().write_value(output);
        }
    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }

}
 
开发者ID:AlvaroVega,项目名称:TIDorbJ,代码行数:21,代码来源:NVListImpl.java


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