Esempio n. 1
0
        IBytesMessageCloak IBytesMessageCloak.Copy()
        {
            IBytesMessageCloak bcloak = new AMQPBytesMessageCloak(connection);

            this.CopyInto(bcloak);
            return(bcloak);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        private static IMessage CreateBytesMessage(MessageConsumer consumer, Amqp.Message message)
        {
            IBytesMessageCloak cloak = new AMQPBytesMessageCloak(consumer, message);

            return(new BytesMessage(cloak));
        }