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


Java Parameter类代码示例

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


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

示例1: arguments

import org.omg.Dynamic.Parameter; //导入依赖的package包/类
/**
 * See ServerRequestInfo for javadocs.
 */
public Parameter[] arguments (){
    checkAccess( MID_ARGUMENTS );

    if( cachedArguments == null ) {
        if( !isDynamic ) {
            throw stdWrapper.piOperationNotSupported1() ;
        }

        if( dsiArguments == null ) {
            throw stdWrapper.piOperationNotSupported8() ;
        }

        // If it is a DSI request then get the arguments from the DSI req
        // and convert that into parameters.
        cachedArguments = nvListToParameterArray( dsiArguments );
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the Parameter[] array.  We also assume
    // they will not change the values of the containing Anys.

    return cachedArguments;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ServerRequestInfoImpl.java

示例2: arguments

import org.omg.Dynamic.Parameter; //导入依赖的package包/类
/**
 * See RequestInfoImpl for javadoc.
 */
public Parameter[] arguments (){
    checkAccess( MID_ARGUMENTS );

    if( cachedArguments == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported1() ;
        }

        // If it is DII request then get the arguments from the DII req
        // and convert that into parameters.
        cachedArguments = nvListToParameterArray( request.arguments() );
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the Parameter[] array.  We also assume
    // they will not change the values of the containing Anys.

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

示例3: nvListToParameterArray

import org.omg.Dynamic.Parameter; //导入依赖的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

示例4: arguments

import org.omg.Dynamic.Parameter; //导入依赖的package包/类
/** @inheritDoc */
public Parameter[] arguments()
{
  request.checkDii();

  NVList args = request.arguments();
  Parameter[] p = new Parameter[ args.count() ];
  try
    {
      for (int i = 0; i < p.length; i++)
        {
          ParameterMode mode;

          switch (args.item(i).flags())
            {
              case ARG_IN.value :
                mode = ParameterMode.PARAM_IN;
                break;

              case ARG_OUT.value :
                mode = ParameterMode.PARAM_OUT;
                break;

              case ARG_INOUT.value :
                mode = ParameterMode.PARAM_INOUT;
                break;

              default :
                throw new Unexpected();
            }

          p [ i ] = new Parameter(args.item(i).value(), mode);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return p;
}
 
开发者ID:vilie,项目名称:javify,代码行数:41,代码来源:gnuClientRequestInfo.java

示例5: arguments

import org.omg.Dynamic.Parameter; //导入依赖的package包/类
/** @inheritDoc */
public Parameter[] arguments()
{
  if (m_request == null)
    {
      throw new NO_RESOURCES(not_available);
    }

  m_request.checkDii();

  NVList args = m_request.arguments();
  Parameter[] p = new Parameter[ args.count() ];
  try
    {
      for (int i = 0; i < p.length; i++)
        {
          ParameterMode mode;

          switch (args.item(i).flags())
            {
              case ARG_IN.value :
                mode = ParameterMode.PARAM_IN;
                break;

              case ARG_OUT.value :
                mode = ParameterMode.PARAM_OUT;
                break;

              case ARG_INOUT.value :
                mode = ParameterMode.PARAM_INOUT;
                break;

              default :
                throw new Unexpected();
            }

          p [ i ] = new Parameter(args.item(i).value(), mode);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return p;
}
 
开发者ID:vilie,项目名称:javify,代码行数:46,代码来源:gnuServerRequestInfo.java

示例6: arguments

import org.omg.Dynamic.Parameter; //导入依赖的package包/类
/**
 * This method returns the list of arguments for the operation that was
 * invoked. It raises NO_RESOURCES exception if the operation is not invoked
 * by using DII mechanism.
 */
abstract public Parameter[] arguments ();
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:RequestInfoImpl.java


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