org.omg.CORBA.Bounds Java Examples

The following examples show how to use org.omg.CORBA.Bounds. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ServerRequestImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #2
Source File: ServerRequestImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #3
Source File: ServerRequestImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #4
Source File: ServerRequestImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #5
Source File: ServerRequestImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #6
Source File: ServerRequestImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #7
Source File: ServerRequestImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #8
Source File: ServerRequestImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #9
Source File: ServerRequestImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** 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);
        }
    }
}
 
Example #10
Source File: ContextListImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public String item(int index)
    throws Bounds
{
    try {
        return (String) _contexts.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #11
Source File: RequestImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example #12
Source File: NVListImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public NamedValue item(int index)
    throws Bounds
{
    try {
        return (NamedValue) _namedValues.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #13
Source File: ContextListImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _contexts.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #14
Source File: ContextListImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _contexts.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #15
Source File: RequestImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example #16
Source File: ExceptionListImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public TypeCode item(int index)
    throws Bounds
{
    try {
        return (TypeCode) _exceptions.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #17
Source File: ExceptionListImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _exceptions.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #18
Source File: NVListImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public NamedValue item(int index)
    throws Bounds
{
    try {
        return (NamedValue) _namedValues.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #19
Source File: ExceptionListImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _exceptions.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #20
Source File: ExceptionListImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public TypeCode item(int index)
    throws Bounds
{
    try {
        return (TypeCode) _exceptions.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #21
Source File: ServerRequestImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
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();
}
 
Example #22
Source File: ServerRequestImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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();
}
 
Example #23
Source File: NVListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _namedValues.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #24
Source File: NVListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public NamedValue item(int index)
    throws Bounds
{
    try {
        return (NamedValue) _namedValues.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #25
Source File: ContextListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _contexts.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #26
Source File: ContextListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public String item(int index)
    throws Bounds
{
    try {
        return (String) _contexts.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #27
Source File: ExceptionListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _exceptions.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #28
Source File: ExceptionListImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public TypeCode item(int index)
    throws Bounds
{
    try {
        return (TypeCode) _exceptions.elementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}
 
Example #29
Source File: RequestImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
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()
    }
}
 
Example #30
Source File: ContextListImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void remove(int index)
    throws Bounds
{
    try {
        _contexts.removeElementAt(index);
    } catch (ArrayIndexOutOfBoundsException e) {
        throw new Bounds();
    }
}