Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        IObjectMessageCloak IObjectMessageCloak.Copy()
        {
            IObjectMessageCloak ocloak = new AMQPObjectMessageCloak(connection, this.objectSerializer.Type);

            this.CopyInto(ocloak);
            return(ocloak);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 internal AMQPTypeSerializer(AMQPObjectMessageCloak msg)
 {
     amqpMessage = msg.AMQPMessage;
     message     = msg;
     msg.SetMessageAnnotation(MessageSupport.JMS_AMQP_TYPE_ENCODING, SymbolUtil.BOOLEAN_TRUE);
 }
Exemplo n.º 5
0
        private static IMessage CreateObjectMessage(MessageConsumer consumer, Amqp.Message message)
        {
            IObjectMessageCloak cloak = new AMQPObjectMessageCloak(consumer, message);

            return(new ObjectMessage(cloak));
        }