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

The following examples show how to use org.omg.CORBA.NamedValue#value() . 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: ClientRequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 2
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 3
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 4
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 5
Source File: ClientRequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 6
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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;
}
 
Example 7
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * 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;
}
 
Example 8
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 9
Source File: RequestImpl.java    From jdk1.8-source-analysis with Apache License 2.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: 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 11
Source File: RequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 12
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 13
Source File: RequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
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 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 16
Source File: RequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 17
Source File: RequestInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 18
Source File: RequestImpl.java    From TencentKona-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 19
Source File: RequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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;
}
 
Example 20
Source File: RequestInfoImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * 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;
}