internal JavaObjectSerializer(AMQPObjectMessageCloak msg)
 {
     amqpMessage = msg.AMQPMessage;
     message     = msg;
     message.SetContentType(SymbolUtil.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
     message.SetMessageAnnotation(MessageSupport.JMS_JAVA_ENCODING, SymbolUtil.BOOLEAN_TRUE);
 }
        IObjectMessageCloak IObjectMessageCloak.Copy()
        {
            IObjectMessageCloak ocloak = new AMQPObjectMessageCloak(connection, this.objectSerializer.Type);

            this.CopyInto(ocloak);
            return(ocloak);
        }
Exemple #3
0
        public virtual IMessageCloak Copy()
        {
            IMessageCloak copy = null;

            switch (JMSMessageType)
            {
            case MessageSupport.JMS_TYPE_MSG:
                copy = new AMQPMessageCloak(connection);
                break;

            case MessageSupport.JMS_TYPE_BYTE:
                copy = new AMQPBytesMessageCloak(connection);
                break;

            case MessageSupport.JMS_TYPE_TXT:
                copy = new AMQPTextMessageCloak(connection);
                break;

            case MessageSupport.JMS_TYPE_MAP:
                copy = new AMQPMapMessageCloak(connection);
                break;

            case MessageSupport.JMS_TYPE_STRM:
                copy = new AMQPStreamMessageCloak(connection);
                break;

            case MessageSupport.JMS_TYPE_OBJ:
                copy = new AMQPObjectMessageCloak(connection, (this as AMQPObjectMessageCloak).Type);
                break;

            default:
                throw new NMSException("Fatal error Invalid JMS type.");
            }

            CopyInto(copy);
            return(copy);
        }
 internal AMQPTypeSerializer(AMQPObjectMessageCloak msg)
 {
     amqpMessage = msg.AMQPMessage;
     message     = msg;
     msg.SetMessageAnnotation(MessageSupport.JMS_AMQP_TYPE_ENCODING, SymbolUtil.BOOLEAN_TRUE);
 }
Exemple #5
0
        private static IMessage CreateObjectMessage(MessageConsumer consumer, Amqp.Message message)
        {
            IObjectMessageCloak cloak = new AMQPObjectMessageCloak(consumer, message);

            return(new ObjectMessage(cloak));
        }