类org.omg.CORBA.UnknownUserException源码实例Demo

下面列出了怎么用org.omg.CORBA.UnknownUserException的API类实例代码及写法,或者点击链接到github查看源代码。

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);
}
 
源代码2 项目: TencentKona-8   文件: CorbaMessageMediatorImpl.java
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);
}
 
源代码3 项目: jdk8u60   文件: CorbaMessageMediatorImpl.java
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);
}
 
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);
}
 
源代码5 项目: openjdk-jdk8u   文件: CorbaMessageMediatorImpl.java
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);
}
 
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);
}
 
源代码7 项目: openjdk-jdk9   文件: CorbaMessageMediatorImpl.java
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);
}
 
源代码8 项目: hottub   文件: CorbaMessageMediatorImpl.java
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);
}
 
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);
}
 
源代码10 项目: openjdk-8   文件: CorbaMessageMediatorImpl.java
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);
}
 
源代码11 项目: cxf   文件: CorbaConduit.java
public void buildRequest(CorbaMessage message, OperationType opType) throws Exception {
    ServiceInfo service = message.getExchange().getEndpoint().getEndpointInfo().getService();
    NVList nvlist = getArguments(message);
    NamedValue ret = getReturn(message);
    Map<TypeCode, RaisesType> exceptions = getOperationExceptions(opType, typeMap);
    ExceptionList exList = getExceptionList(exceptions, message, opType);
    Request request = getRequest(message, opType.getName(), nvlist, ret, exList);
    if (request == null) {
        throw new CorbaBindingException("Couldn't build the corba request");
    }
    Exception ex = null;
    try {
        request.invoke();
        ex = request.env().exception();
    } catch (SystemException sysex) {
        ex = sysex;
    }
    if (ex != null) {
        if (ex instanceof SystemException) {
            message.setContent(Exception.class, new Fault(ex));
            message.setSystemException((SystemException) ex);
            return;
        }
        if (ex instanceof UnknownUserException) {
            UnknownUserException userEx = (UnknownUserException) ex;
            Any except = userEx.except;
            RaisesType raises = exceptions.get(except.type());
            if (raises == null) {
                throw new CorbaBindingException("Couldn't find the exception type code to unmarshall");
            }
            QName elName = new QName("", raises.getException().getLocalPart());
            CorbaObjectHandler handler =
                CorbaHandlerUtils.initializeObjectHandler(orb,
                                                          elName,
                                                          raises.getException(),
                                                          typeMap,
                                                          service);

            CorbaStreamable exStreamable = message.createStreamableObject(handler, elName);
            exStreamable._read(except.create_input_stream());
            message.setStreamableException(exStreamable);
            message.setContent(Exception.class, new Fault(userEx));
        } else {
            message.setContent(Exception.class, new Fault(ex));
        }
    }
}
 
 类所在包
 类方法
 同包方法