Java Code Examples for org.omg.CORBA.ContextList#item()

The following examples show how to use org.omg.CORBA.ContextList#item() . 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 jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 2
Source File: ClientRequestInfoImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 3
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 4
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 5
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 6
Source File: ClientRequestInfoImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 7
Source File: ClientRequestInfoImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 8
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 9
Source File: ClientRequestInfoImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}
 
Example 10
Source File: ClientRequestInfoImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public String[] contexts (){
    checkAccess( MID_CONTEXTS );

    if( cachedContexts == null ) {
        if( request == null ) {
            throw stdWrapper.piOperationNotSupported3() ;
        }

        // Get the list of contexts from DII request data, If there are
        // no contexts then this method will return null.
        ContextList ctxList = request.contexts( );
        int count = ctxList.count();
        String[] ctxListToReturn = new String[count];
        try {
            for( int i = 0; i < count; i++ ) {
                ctxListToReturn[i] = ctxList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInContexts( e ) ;
        }

        cachedContexts = ctxListToReturn;
    }

    // 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 cachedContexts;
}