Java 类org.omg.CORBA.Bounds 实例源码

项目:OpenJSharp    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:openjdk-jdk10    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:openjdk9    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:jdk8u_corba    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:javify    文件:gnuClientRequestInfo.java   
/** @inheritDoc */
public TypeCode[] exceptions()
{
  request.checkDii();

  ExceptionList ex = request.exceptions();
  TypeCode[] et = new TypeCode[ ex.count() ];
  try
    {
      for (int i = 0; i < et.length; i++)
        {
          et [ i ] = ex.item(i);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return et;
}
项目:javify    文件:gnuRequest.java   
/**
 * Set the argument list. This field is initialised as empty non null instance
 * by default, so the method is only used in cases when the direct replacement
 * is desired.
 *
 * @param a_args the argument list.
 */
public void set_args(NVList a_args)
{
  if (a_args instanceof gnuNVList)
    m_args = (gnuNVList) a_args;
  else
    {
      try
        {
          // In case if this is another implementation of the NVList.
          m_args.list.clear();
          for (int i = 0; i < a_args.count(); i++)
            {
              m_args.add(a_args.item(i));
            }
        }
      catch (Bounds ex)
        {
          Unexpected.error(ex);
        }
    }
}
项目:javify    文件:gnuRequest.java   
/**
 * Get contexts as required by interceptor.
 */
public String[] ice_contexts()
{
  if (m_context_list == null)
    return new String[ 0 ];
  else
    {
      try
        {
          String[] cn = new String[ m_context_list.count() ];
          for (int i = 0; i < cn.length; i++)
            cn [ i ] = m_context_list.item(i);
          return cn;
        }
      catch (Bounds e)
        {
          throw new Unexpected(e);
        }
    }
}
项目:jvm-stm    文件:gnuClientRequestInfo.java   
/** @inheritDoc */
public TypeCode[] exceptions()
{
  request.checkDii();

  ExceptionList ex = request.exceptions();
  TypeCode[] et = new TypeCode[ ex.count() ];
  try
    {
      for (int i = 0; i < et.length; i++)
        {
          et [ i ] = ex.item(i);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return et;
}
项目:jvm-stm    文件:gnuRequest.java   
/**
 * Set the argument list. This field is initialised as empty non null instance
 * by default, so the method is only used in cases when the direct replacement
 * is desired.
 *
 * @param a_args the argument list.
 */
public void set_args(NVList a_args)
{
  if (a_args instanceof gnuNVList)
    m_args = (gnuNVList) a_args;
  else
    {
      try
        {
          // In case if this is another implementation of the NVList.
          m_args.list.clear();
          for (int i = 0; i < a_args.count(); i++)
            {
              m_args.add(a_args.item(i));
            }
        }
      catch (Bounds ex)
        {
          Unexpected.error(ex);
        }
    }
}
项目:jvm-stm    文件:gnuRequest.java   
/**
 * Get contexts as required by interceptor.
 */
public String[] ice_contexts()
{
  if (m_context_list == null)
    return new String[ 0 ];
  else
    {
      try
        {
          String[] cn = new String[ m_context_list.count() ];
          for (int i = 0; i < cn.length; i++)
            cn [ i ] = m_context_list.item(i);
          return cn;
        }
      catch (Bounds e)
        {
          throw new Unexpected(e);
        }
    }
}
项目:infobip-open-jdk-8    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:openjdk-source-code-learn    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:OLD-OpenJDK8    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:JamVM-PH    文件:gnuClientRequestInfo.java   
/** @inheritDoc */
public TypeCode[] exceptions()
{
  request.checkDii();

  ExceptionList ex = request.exceptions();
  TypeCode[] et = new TypeCode[ ex.count() ];
  try
    {
      for (int i = 0; i < et.length; i++)
        {
          et [ i ] = ex.item(i);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return et;
}
项目:JamVM-PH    文件:gnuRequest.java   
/**
 * Set the argument list. This field is initialised as empty non null instance
 * by default, so the method is only used in cases when the direct replacement
 * is desired.
 *
 * @param a_args the argument list.
 */
public void set_args(NVList a_args)
{
  if (a_args instanceof gnuNVList)
    m_args = (gnuNVList) a_args;
  else
    {
      try
        {
          // In case if this is another implementation of the NVList.
          m_args.list.clear();
          for (int i = 0; i < a_args.count(); i++)
            {
              m_args.add(a_args.item(i));
            }
        }
      catch (Bounds ex)
        {
          Unexpected.error(ex);
        }
    }
}
项目:JamVM-PH    文件:gnuRequest.java   
/**
 * Get contexts as required by interceptor.
 */
public String[] ice_contexts()
{
  if (m_context_list == null)
    return new String[ 0 ];
  else
    {
      try
        {
          String[] cn = new String[ m_context_list.count() ];
          for (int i = 0; i < cn.length; i++)
            cn [ i ] = m_context_list.item(i);
          return cn;
        }
      catch (Bounds e)
        {
          throw new Unexpected(e);
        }
    }
}
项目:openjdk-orb    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:classpath    文件:gnuClientRequestInfo.java   
/** @inheritDoc */
public TypeCode[] exceptions()
{
  request.checkDii();

  ExceptionList ex = request.exceptions();
  TypeCode[] et = new TypeCode[ ex.count() ];
  try
    {
      for (int i = 0; i < et.length; i++)
        {
          et [ i ] = ex.item(i);
        }
    }
  catch (Bounds e)
    {
      throw new Unexpected(e);
    }
  return et;
}
项目:classpath    文件:gnuRequest.java   
/**
 * Set the argument list. This field is initialised as empty non null instance
 * by default, so the method is only used in cases when the direct replacement
 * is desired.
 *
 * @param a_args the argument list.
 */
public void set_args(NVList a_args)
{
  if (a_args instanceof gnuNVList)
    m_args = (gnuNVList) a_args;
  else
    {
      try
        {
          // In case if this is another implementation of the NVList.
          m_args.list.clear();
          for (int i = 0; i < a_args.count(); i++)
            {
              m_args.add(a_args.item(i));
            }
        }
      catch (Bounds ex)
        {
          Unexpected.error(ex);
        }
    }
}
项目:classpath    文件:gnuRequest.java   
/**
 * Get contexts as required by interceptor.
 */
public String[] ice_contexts()
{
  if (m_context_list == null)
    return new String[ 0 ];
  else
    {
      try
        {
          String[] cn = new String[ m_context_list.count() ];
          for (int i = 0; i < cn.length; i++)
            cn [ i ] = m_context_list.item(i);
          return cn;
        }
      catch (Bounds e)
        {
          throw new Unexpected(e);
        }
    }
}
项目:openjdk-icedtea7    文件:ServerRequestImpl.java   
/** 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);
        }
    }
}
项目:TIDorbJ    文件:ContextImpl.java   
public void set_values(org.omg.CORBA.NVList values)
{
    if (values == null) {
        throw new BAD_PARAM("Null NVList reference", 0,
                            CompletionStatus.COMPLETED_NO);
    }

    m_values = new NVListImpl(m_orb);

    int list_size = values.count();
    try {
        for (int i = 0; i < list_size; i++) {
            set_one_value(values.item(i).name(), values.item(i).value());
        }
    }
    catch (Bounds bds) {}
}
项目:TIDorbJ    文件:ContextImpl.java   
public void delete_values(String prop_name)
{
    if (prop_name == null)
        throw new BAD_PARAM("Null string reference", 0,
                            CompletionStatus.COMPLETED_NO);

    if (m_values != null) {
        int list_size = m_values.count();
        try {
            for (int i = 0; i < list_size; i++) {
                if (prop_name.equals(m_values.item(i).name())) {
                    m_values.remove(i);
                }
            }
        }
        catch (Bounds bds) {}
    }
}
项目:TIDorbJ    文件:NVListImpl.java   
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");
    }
}
项目:TIDorbJ    文件:NVListImpl.java   
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");
    }

}
项目:TIDorbJ    文件:NVListImpl.java   
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");
    }

}
项目:TIDorbJ    文件:NVListImpl.java   
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");
    }

}
项目:TIDorbJ    文件:NVListImpl.java   
public static void readInParams(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_OUT.value)
                nam_val.value().read_value(input, nam_val.value().type());
        }
    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }
}
项目:TIDorbJ    文件:NVListImpl.java   
public static void writeInParams(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_OUT.value)
                nam_val.value().write_value(output);
        }
    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }
}
项目:TIDorbJ    文件:NVListImpl.java   
public static void setOutParamsAsIn(NVList list, RequestImpl replyHandlerRequest)
{
    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) {
                org.omg.CORBA.Any $arg = replyHandlerRequest.add_named_in_arg(nam_val.name());
                $arg.type(nam_val.value().type());
            }
        }
    }
    catch (Bounds bds) {
        throw new BAD_PARAM("Bad NVList");
    }
}
项目:OpenJSharp    文件:RequestImpl.java   
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()
    }
}
项目:OpenJSharp    文件:ExceptionListImpl.java   
public TypeCode item(int index)
    throws Bounds
{
    try {
        return (TypeCode) _exceptions.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:ExceptionListImpl.java   
public void remove(int index)
    throws Bounds
{
    try {
        _exceptions.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:ContextListImpl.java   
public String item(int index)
    throws Bounds
{
    try {
        return (String) _contexts.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:ContextListImpl.java   
public void remove(int index)
    throws Bounds
{
    try {
        _contexts.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:NVListImpl.java   
public NamedValue item(int index)
    throws Bounds
{
    try {
        return (NamedValue) _namedValues.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:NVListImpl.java   
public void remove(int index)
    throws Bounds
{
    try {
        _namedValues.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
项目:OpenJSharp    文件:ServerRequestImpl.java   
public void arguments(NVList args)
{
    if (_paramsCalled)
        throw _wrapper.argumentsCalledMultiple() ;

    if (_exceptionSet)
        throw _wrapper.argumentsCalledAfterException() ;

    if (args == null )
        throw _wrapper.argumentsCalledNullArgs() ;

    _paramsCalled = true;

    NamedValue arg = null;
    for (int i=0; i < args.count() ; i++) {
        try {
            arg = args.item(i);
        } catch (Bounds e) {
            throw _wrapper.boundsCannotOccur(e) ;
        }

        try {
            if ((arg.flags() == org.omg.CORBA.ARG_IN.value) ||
                (arg.flags() == org.omg.CORBA.ARG_INOUT.value)) {
                // unmarshal the value into the Any
                arg.value().read_value(_ins, arg.value().type());
            }
        } catch ( Exception ex ) {
            throw _wrapper.badArgumentsNvlist( ex ) ;
        }
    }

    // hang on to the NVList for marshaling the result
    _arguments = args;

    _orb.getPIHandler().setServerPIInfo( _arguments );
    _orb.getPIHandler().invokeServerPIIntermediatePoint();
}
项目:openjdk-jdk10    文件:RequestImpl.java   
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()
    }
}