示例#1
0
        IMapMessageCloak IMapMessageCloak.Copy()
        {
            IMapMessageCloak copy = new AMQPMapMessageCloak(Connection);

            CopyInto(copy);
            return(copy);
        }
示例#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);
        }
示例#3
0
        private static IMessage CreateMapMessage(MessageConsumer consumer, Amqp.Message message)
        {
            IMapMessageCloak cloak = new AMQPMapMessageCloak(consumer, message);

            return(new MapMessage(cloak));
        }