Java Code Examples for org.omg.CORBA.NamedValue#flags()

The following examples show how to use org.omg.CORBA.NamedValue#flags() . 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 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 2
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 3
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 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-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 6
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 7
Source File: RequestImpl.java    From openjdk-8 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 8
Source File: ServerRequestImpl.java    From openjdk-jdk9 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 9
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 10
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 11
Source File: ServerRequestImpl.java    From hottub 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 12
Source File: RequestImpl.java    From hottub 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 13
Source File: RequestImpl.java    From openjdk-jdk8u 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 14
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 15
Source File: RequestImpl.java    From JDKSourceCode1.8 with MIT License 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: ServerRequestImpl.java    From jdk8u60 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 17
Source File: RequestImpl.java    From jdk8u60 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 18
Source File: ServerRequestImpl.java    From openjdk-8 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 19
Source File: ServerRequestImpl.java    From openjdk-8-source 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 20
Source File: ServerRequestImpl.java    From jdk1.8-source-analysis with Apache License 2.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();
}