this.createMessage = function()

in shims/rhea-js/amqp_types_test/Sender.js [77:106]


    this.createMessage = function(testValue) {
        //console.log("createMessage: amqpType=" + this.amqpType + "; testValue=" + testValue);
        switch(this.amqpType) {
        case "null": return {body: this.encodeNull(testValue)};
        case "boolean": return {body: amqp_types.wrap_boolean(this.encodeBoolean(testValue))};
        case "ubyte": return {body: amqp_types.wrap_ubyte(this.encodeUbyte(testValue))};
        case "ushort": return {body: amqp_types.wrap_ushort(this.encodeUshort(testValue))};
        case "uint": return {body: amqp_types.wrap_uint(this.encodeUint(testValue))};
        case "ulong": return {body: amqp_types.wrap_ulong(this.encodeUlong(testValue))};
        case "byte": return {body: amqp_types.wrap_byte(this.encodeByte(testValue))};
        case "short": return {body: amqp_types.wrap_short(this.encodeShort(testValue))};
        case "int": return {body: amqp_types.wrap_int(this.encodeInt(testValue))};
        case "long": return {body: amqp_types.wrap_long(this.encodeLong(testValue))};
        case "float": return {body: amqp_types.wrap_float(this.encodeFloat(testValue))};
        case "double": return {body: amqp_types.wrap_double(this.encodeDouble(testValue))};
        case "decimal32": return {body: new amqp_types.Decimal32(this.encodeDecimal32(testValue))};
        case "decimal64": return {body: new amqp_types.Decimal64(this.encodeDecimal64(testValue))};
        case "decimal128": return {body: new amqp_types.Decimal128(this.encodeDecimal128(testValue))};
        case "char": return {body: new amqp_types.CharUTF32(this.encodeChar(testValue))};
        case "timestamp": return {body: amqp_types.wrap_timestamp(this.encodeTimestamp(testValue))};
        case "uuid": return {body: new amqp_types.Uuid(this.encodeUuid(testValue))};
        case "binary": return {body: amqp_types.wrap_binary(this.encodeBinary(testValue))};
        case "string": return {body: amqp_types.wrap_string(this.encodeString(testValue))};
        case "symbol": return {body: amqp_types.wrap_symbol(this.encodeSymbol(testValue))};
        case "list":
        case "map":
        case "array": throw "Unsupported complex AMQP type: \"" + this.amqpType + "\"";
        default: throw "Unknown AMQP type: \"" + this.amqpType + "\"";
        }
    };