Package com.sun.corba.se.impl.logging

Examples of com.sun.corba.se.impl.logging.ORBUtilSystemException


        case USER_EXCEPTION :
        case SYSTEM_EXCEPTION :
        case LOCATION_FORWARD :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here


                          new IDLJavaSerializationInputStream(encodingVersion);
                    }
                    return new CDRInputStream_1_2();
                    // else fall through and report exception.
                default:
                    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                        CORBALogDomains.RPC_ENCODING ) ;
                    throw wrapper.unsupportedGiopVersion( version ) ;
            }
        }
View Full Code Here

        case LOCATION_FORWARD :
        case LOCATION_FORWARD_PERM :
        case NEEDS_ADDRESSING_MODE :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here

        case USER_EXCEPTION :
        case SYSTEM_EXCEPTION :
        case LOCATION_FORWARD :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here

                    return
                        new IDLJavaSerializationOutputStream(encodingVersion);
                }
                return new CDROutputStream_1_2();
            default:
                    ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
                        CORBALogDomains.RPC_ENCODING ) ;
                    // REVISIT - what is appropriate?  INTERNAL exceptions
                    // are really hard to track later.
                    throw wrapper.unsupportedGiopVersion( version ) ;
            }
        }
View Full Code Here

        case UNKNOWN_OBJECT :
        case OBJECT_HERE :
        case OBJECT_FORWARD :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here

        case UNKNOWN_OBJECT :
        case OBJECT_HERE :
        case OBJECT_FORWARD :
            break;
        default :
            ORBUtilSystemException localWrapper = ORBUtilSystemException.get(
                CORBALogDomains.RPC_PROTOCOL ) ;
            throw localWrapper.illegalReplyStatus( CompletionStatus.COMPLETED_MAYBE);
        }
    }
View Full Code Here

        return AnyImpl.extractAnyFromStream(memberType, input, orb);
    }

    // Creates a default Any of the given type.
    static Any createDefaultAnyOfType(TypeCode typeCode, ORB orb) {
        ORBUtilSystemException wrapper = ORBUtilSystemException.get( orb,
            CORBALogDomains.RPC_PRESENTATION ) ;

        Any returnValue = orb.create_any();
        // The spec for DynAny differs from Any on initialization via type code:
        // - false for boolean
        // - zero for numeric types
        // - zero for types octet, char, and wchar
        // - the empty string for string and wstring
        // - nil for object references
        // - a type code with a TCKind value of tk_null for type codes
        // - for Any values, an Any containing a type code with a TCKind value of tk_null
        //   type and no value
        switch (typeCode.kind().value()) {
            case TCKind._tk_boolean:
                // false for boolean
                returnValue.insert_boolean(false);
                break;
            case TCKind._tk_short:
                // zero for numeric types
                returnValue.insert_short((short)0);
                break;
            case TCKind._tk_ushort:
                // zero for numeric types
                returnValue.insert_ushort((short)0);
                break;
            case TCKind._tk_long:
                // zero for numeric types
                returnValue.insert_long(0);
                break;
            case TCKind._tk_ulong:
                // zero for numeric types
                returnValue.insert_ulong(0);
                break;
            case TCKind._tk_longlong:
                // zero for numeric types
                returnValue.insert_longlong((long)0);
                break;
            case TCKind._tk_ulonglong:
                // zero for numeric types
                returnValue.insert_ulonglong((long)0);
                break;
            case TCKind._tk_float:
                // zero for numeric types
                returnValue.insert_float((float)0.0);
                break;
            case TCKind._tk_double:
                // zero for numeric types
                returnValue.insert_double((double)0.0);
                break;
            case TCKind._tk_octet:
                // zero for types octet, char, and wchar
                returnValue.insert_octet((byte)0);
                break;
            case TCKind._tk_char:
                // zero for types octet, char, and wchar
                returnValue.insert_char((char)0);
                break;
            case TCKind._tk_wchar:
                // zero for types octet, char, and wchar
                returnValue.insert_wchar((char)0);
                break;
            case TCKind._tk_string:
                // the empty string for string and wstring
                // Make sure that type code for bounded strings gets respected
                returnValue.type(typeCode);
                // Doesn't erase the type of bounded string
                returnValue.insert_string("");
                break;
            case TCKind._tk_wstring:
                // the empty string for string and wstring
                // Make sure that type code for bounded strings gets respected
                returnValue.type(typeCode);
                // Doesn't erase the type of bounded string
                returnValue.insert_wstring("");
                break;
            case TCKind._tk_objref:
                // nil for object references
                returnValue.insert_Object(null);
                break;
            case TCKind._tk_TypeCode:
                // a type code with a TCKind value of tk_null for type codes
                // We can reuse the type code that's already in the any.
                returnValue.insert_TypeCode(returnValue.type());
                break;
            case TCKind._tk_any:
                // for Any values, an Any containing a type code with a TCKind value
                // of tk_null type and no value.
                // This is exactly what the default AnyImpl constructor provides.
                // _REVISIT_ Note that this inner Any is considered uninitialized.
                returnValue.insert_any(orb.create_any());
                break;
            case TCKind._tk_struct:
            case TCKind._tk_union:
            case TCKind._tk_enum:
            case TCKind._tk_sequence:
            case TCKind._tk_array:
            case TCKind._tk_except:
            case TCKind._tk_value:
            case TCKind._tk_value_box:
                // There are no default value for complex types since there is no
                // concept of a hierarchy of Anys. Only DynAnys can be arrange in
                // a hierarchy to mirror the TypeCode hierarchy.
                // See DynAnyConstructedImpl.initializeComponentsFromTypeCode()
                // on how this DynAny hierarchy is created from TypeCodes.
                returnValue.type(typeCode);
                break;
            case TCKind._tk_fixed:
                returnValue.insert_fixed(new BigDecimal("0.0"), typeCode);
                break;
            case TCKind._tk_native:
            case TCKind._tk_alias:
            case TCKind._tk_void:
            case TCKind._tk_Principal:
            case TCKind._tk_abstract_interface:
                returnValue.type(typeCode);
                break;
            case TCKind._tk_null:
                // Any is already initialized to null
                break;
            case TCKind._tk_longdouble:
                // Unspecified for Java
                throw wrapper.tkLongDoubleNotSupported() ;
            default:
                throw wrapper.typecodeNotSupported() ;
        }
        return returnValue;
    }
View Full Code Here

        if (handler == null) {
            if (defaultHandler != null)
                handler = defaultHandler ;
            else {
                ORBUtilSystemException wrapper = ORBUtilSystemException.get(
                    CORBALogDomains.UTIL ) ;
                throw wrapper.noInvocationHandler( "\"" + method.toString() +
                    "\"" ) ;
            }
        }

        // handler should never be null here.
View Full Code Here

     * IIOPProfile must support getServant.
     */
    public static org.omg.CORBA.Object internalIORToObject(
        IOR ior, PresentationManager.StubFactory stubFactory, ORB orb)
    {
        ORBUtilSystemException wrapper = ORBUtilSystemException.get(
            (ORB)orb, CORBALogDomains.RPC_ENCODING ) ;

        java.lang.Object servant = ior.getProfile().getServant() ;
        if (servant != null ) {
            if (servant instanceof Tie) {
                String codebase = ior.getProfile().getCodebase();
                org.omg.CORBA.Object objref = (org.omg.CORBA.Object)
                    Utility.loadStub( (Tie)servant, stubFactory, codebase,
                        false);

                // If we managed to load a stub, return it, otherwise we
                // must fail...
                if (objref != null) {
                    return objref;
                } else {
                    throw wrapper.readObjectException() ;
                }
            } else if (servant instanceof org.omg.CORBA.Object) {
                if (!(servant instanceof
                        org.omg.CORBA.portable.InvokeHandler)) {
                    return (org.omg.CORBA.Object) servant;
                }
            } else
                throw wrapper.badServantReadObject() ;
        }

        CorbaClientDelegate del = ORBUtility.makeClientDelegate( ior ) ;
        org.omg.CORBA.Object objref = null ;
        try {
            objref = stubFactory.makeStub() ;
        } catch (Throwable e) {
            wrapper.stubCreateError( e ) ;

            if (e instanceof ThreadDeath) {
                throw (ThreadDeath) e;
            }

View Full Code Here

TOP

Related Classes of com.sun.corba.se.impl.logging.ORBUtilSystemException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.