Java Code Examples for org.omg.CORBA.ExceptionList#count()

The following examples show how to use org.omg.CORBA.ExceptionList#count() . 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: CorbaMessageMediatorImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 2
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 3
Source File: CorbaMessageMediatorImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 4
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 5
Source File: CorbaMessageMediatorImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 6
Source File: ClientRequestInfoImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 7
Source File: CorbaMessageMediatorImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 8
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 9
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 10
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 11
Source File: CorbaMessageMediatorImpl.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 12
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 13
Source File: CorbaMessageMediatorImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 14
Source File: ClientRequestInfoImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 15
Source File: CorbaMessageMediatorImpl.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 16
Source File: ClientRequestInfoImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * See RequestInfoImpl for javadoc.
 */
public TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 17
Source File: CorbaMessageMediatorImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 18
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}
 
Example 19
Source File: CorbaMessageMediatorImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Exception unmarshalDIIUserException(String repoId, InputStream is)
{
    if (! isDIIRequest()) {
        return null;
    }

    ExceptionList _exceptions = diiRequest.exceptions();

    try {
        // Find the typecode for the exception
        for (int i=0; i<_exceptions.count() ; i++) {
            TypeCode tc = _exceptions.item(i);
            if ( tc.id().equals(repoId) ) {
                // Since we dont have the actual user exception
                // class, the spec says we have to create an
                // UnknownUserException and put it in the
                // environment.
                Any eany = orb.create_any();
                eany.read_value(is, (TypeCode)tc);

                return new UnknownUserException(eany);
            }
        }
    } catch (Exception b) {
        throw wrapper.unexpectedDiiException(b);
    }

    // must be a truly unknown exception
    return wrapper.unknownCorbaExc( CompletionStatus.COMPLETED_MAYBE);
}
 
Example 20
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 TypeCode[] exceptions (){
    checkAccess( MID_EXCEPTIONS );

    if( cachedExceptions == null ) {
        if( request == null ) {
           throw stdWrapper.piOperationNotSupported2() ;
        }

        // Get the list of exceptions from DII request data, If there are
        // no exceptions raised then this method will return null.
        ExceptionList excList = request.exceptions( );
        int count = excList.count();
        TypeCode[] excTCList = new TypeCode[count];
        try {
            for( int i = 0; i < count; i++ ) {
                excTCList[i] = excList.item( i );
            }
        } catch( Exception e ) {
            throw wrapper.exceptionInExceptions( e ) ;
        }

        cachedExceptions = excTCList;
    }

    // Good citizen: In the interest of efficiency, we assume
    // interceptors will be "good citizens" in that they will not
    // modify the contents of the TypeCode[] array.  We also assume
    // they will not change the values of the containing TypeCodes.

    return cachedExceptions;
}