/// <summary>
 /// Creates the content header properties from a buffer.
 /// </summary>
 /// <param name="classId">The class id.</param>
 /// <param name="propertyFlags">The property flags.</param>
 /// <param name="buffer">The buffer.</param>
 /// <returns>a populated properties structure</returns>
 /// <exception cref="AMQFrameDecodingException">if the buffer cannot be decoded</exception>
 public IContentHeaderProperties CreateContentHeaderProperties(ushort classId, ushort propertyFlags,
                                                               ByteBuffer buffer)             
 {
     IContentHeaderProperties properties;
     switch (classId)
     {
         case 60:
             properties = new BasicContentHeaderProperties();
             break;
         default:
             throw new AMQFrameDecodingException("Unsupport content header class id: " + classId);
     }
     properties.PopulatePropertiesFromBuffer(buffer, propertyFlags);
     return properties;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates the content header properties from a buffer.
        /// </summary>
        /// <param name="classId">The class id.</param>
        /// <param name="propertyFlags">The property flags.</param>
        /// <param name="buffer">The buffer.</param>
        /// <returns>a populated properties structure</returns>
        /// <exception cref="AMQFrameDecodingException">if the buffer cannot be decoded</exception>
        public IContentHeaderProperties CreateContentHeaderProperties(ushort classId, ushort propertyFlags,
                                                                      ByteBuffer buffer)
        {
            IContentHeaderProperties properties;

            switch (classId)
            {
            case 60:
                properties = new BasicContentHeaderProperties();
                break;

            default:
                throw new AMQFrameDecodingException("Unsupport content header class id: " + classId);
            }
            properties.PopulatePropertiesFromBuffer(buffer, propertyFlags);
            return(properties);
        }
Esempio n. 3
0
 protected AbstractQmsMessage(BasicContentHeaderProperties contentHeader, long deliveryTag) : base(contentHeader, deliveryTag)
 {
     Init(null);
 }
Esempio n. 4
0
 protected AbstractQmsMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, ByteBuffer data)
     : this(contentHeader, deliveryTag)
 {
     Init(data);
 }
Esempio n. 5
0
 internal QpidTextMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, ByteBuffer data)
     :base(deliveryTag, contentHeader, data)
 {
 }
        public static AMQFrame CreateAMQFrame(ushort channelId, ushort classId, ushort weight, BasicContentHeaderProperties properties,
                                              uint bodySize)
        {
            AMQFrame frame = new AMQFrame();

            frame.Channel   = channelId;
            frame.BodyFrame = new ContentHeaderBody(classId, weight, properties, bodySize);
            return(frame);
        }
Esempio n. 7
0
 public static AMQFrame CreateAMQFrame(ushort channelId, ushort classId, ushort weight, BasicContentHeaderProperties properties,
                                       uint bodySize)
 {
     AMQFrame frame = new AMQFrame();
     frame.Channel = channelId;
     frame.BodyFrame = new ContentHeaderBody(classId, weight, properties, bodySize);
     return frame;
 }