Java Code Examples for org.omg.CORBA.Context.get_values()

The following are Jave code examples for showing how to use get_values() of the org.omg.CORBA.Context class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: OpenJSharp   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 2
Project: openjdk-jdk10   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 3
Project: openjdk9   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 4
Project: lookaside_java-1.8.0-openjdk   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 5
Project: jdk8u_corba   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 6
Project: infobip-open-jdk-8   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 7
Project: openjdk-source-code-learn   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 8
Project: OLD-OpenJDK8   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 9
Project: openjdk-orb   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}
 
Example 10
Project: openjdk-icedtea7   File: ClientRequestInfoImpl.java   View Source Code Vote up 4 votes
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] operation_context (){
    checkAccess( MID_OPERATION_CONTEXT );

    if( cachedOperationContext == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported4() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        Context ctx = request.ctx( );
        // _REVISIT_ The API for get_values is not compliant with the spec,
        // Revisit this code once it's fixed.
        // _REVISIT_ Our ORB doesn't support Operation Context, This code
        // will not be excerscised until it's supported.
        // The first parameter in get_values is the start_scope which
        // if blank makes it as a global scope.
        // The second parameter is op_flags which is set to RESTRICT_SCOPE
        // As there is only one defined in the spec.
        // The Third param is the pattern which is '*' requiring it to
        // get all the contexts.
        NVList nvList = ctx.get_values( "", CTX_RESTRICT_SCOPE.value,"*" );
        String[] context = new String[(nvList.count() * 2) ];
        if( ( nvList != null ) &&( nvList.count() != 0 ) ) {
            // The String[] array will contain Name and Value for each
            // context and hence double the size in the array.
            int index = 0;
            for( int i = 0; i < nvList.count(); i++ ) {
                NamedValue nv;
                try {
                    nv = nvList.item( i );
                }
                catch (Exception e ) {
                    return (String[]) null;
                }
                context[index] = nv.name();
                index++;
                context[index] = nv.value().extract_string();
                index++;
            }
        }

        cachedOperationContext = context;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the String[] array.

    return cachedOperationContext;
}