Package org.omg.CORBA

Examples of org.omg.CORBA.Any.type()


                try {
                    expectedMemberType = expectedTypeCode.member_type(i);
                } catch (BadKind badKind) { // impossible
                } catch (Bounds bounds) { // impossible
                }
                if (! expectedMemberType.equal(memberAny.type())) {
                    clearData();
                    // _REVISIT_ More info
                    throw new TypeMismatch();
                }
View Full Code Here


        }
        checkInitComponents();
        Any discriminatorAny = getAny(discriminator);
        // erase the discriminators value so that it does not correspond
        // to any of the unions case labels
        discriminatorAny.type(discriminatorAny.type());
        index = 0;
        currentMemberIndex = NO_INDEX;
        // Necessary to guarantee OBJECT_NOT_EXIST in member()
        currentMember.destroy();
        currentMember = null;
View Full Code Here

        }
        checkInitComponents();
        Any discriminatorAny = getAny(discriminator);
        // erase the discriminators value so that it does not correspond
        // to any of the unions case labels
        discriminatorAny.type(discriminatorAny.type());
        index = 0;
        currentMemberIndex = NO_INDEX;
        // Necessary to guarantee OBJECT_NOT_EXIST in member()
        currentMember.destroy();
        currentMember = null;
View Full Code Here

                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
View Full Code Here

                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
View Full Code Here

                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.
View Full Code Here

                // 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:
View Full Code Here

            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:
View Full Code Here

    }

    public Object readAny(org.omg.CORBA.portable.InputStream in)
            throws org.omg.CORBA.SystemException {
        Any any = in.read_any();
        TypeCode typecode = any.type();

        switch (typecode.kind().value()) {

        case TCKind._tk_null:
        case TCKind._tk_void:
View Full Code Here

                }
                corbaBinding.unmarshal(mc, objectCtx, callback);
            } else if (ex instanceof UnknownUserException) {
                UnknownUserException userEx = (UnknownUserException)ex;
                Any exAny = userEx.except;
                RaisesType raisesExType = exceptions.get(exAny.type());
               
                CorbaStreamable streamableEx = createStreamableException(exAny, raisesExType);
                mc.getMessage().setStreamableException(streamableEx);
                corbaBinding.unmarshalFault(mc, objectCtx, callback);
            } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.