Package org.apache.qpid.proton.amqp.messaging

Examples of org.apache.qpid.proton.amqp.messaging.Header


   {
      public static ServerMessageImpl transform(ProtonRemotingConnection connection, EncodedMessage encodedMessage) throws Exception
      {
         org.apache.qpid.proton.message.Message protonMessage = encodedMessage.decode();

         Header header = protonMessage.getHeader();
         if (header == null)
         {
            header = new Header();
         }

         ServerMessageImpl message = connection.createServerMessage();
         TypedProperties properties = message.getProperties();
View Full Code Here


      public static EncodedMessage transform(ServerMessage message, int deliveryCount)
      {
         long messageFormat = message.getLongProperty(MESSAGE_FORMAT);
         Integer size = message.getIntProperty(PROTON_MESSAGE_SIZE_SS);

         Header header = populateHeader(message, deliveryCount);
         DeliveryAnnotations deliveryAnnotations = populateDeliveryAnnotations(message);
         MessageAnnotations messageAnnotations = populateMessageAnnotations(message);
         Properties props = populateProperties(message);
         ApplicationProperties applicationProperties = populateApplicationProperties(message);
         Section section = populateBody(message);
View Full Code Here

         return new EncodedMessage(messageFormat, buffer.array(), 0, c);
      }

      private static Header populateHeader(ServerMessage message, int deliveryCount)
      {
         Header header = new Header();
         header.setDurable(message.isDurable());
         header.setPriority(new UnsignedByte(message.getPriority()));
         header.setDeliveryCount(new UnsignedInteger(deliveryCount));
         header.setTtl(new UnsignedInteger((int) message.getExpiration()));
         return header;
      }
View Full Code Here

   {
      public static ServerMessageImpl transform(ProtonRemotingConnection connection, EncodedMessage encodedMessage) throws Exception
      {
         org.apache.qpid.proton.message.Message protonMessage = encodedMessage.decode();

         Header header = protonMessage.getHeader();
         if (header == null)
         {
            header = new Header();
         }

         ServerMessageImpl message = connection.createServerMessage();
         TypedProperties properties = message.getProperties();
View Full Code Here

      public static EncodedMessage transform(ServerMessage message, int deliveryCount)
      {
         long messageFormat = message.getLongProperty(MESSAGE_FORMAT);
         Integer size = message.getIntProperty(PROTON_MESSAGE_SIZE_SS);

         Header header = populateHeader(message, deliveryCount);
         DeliveryAnnotations deliveryAnnotations = populateDeliveryAnnotations(message);
         MessageAnnotations messageAnnotations = populateMessageAnnotations(message);
         Properties props = populateProperties(message);
         ApplicationProperties applicationProperties = populateApplicationProperties(message);
         Section section = populateBody(message);
View Full Code Here

         return new EncodedMessage(messageFormat, buffer.array(), 0, c);
      }

      private static Header populateHeader(ServerMessage message, int deliveryCount)
      {
         Header header = new Header();
         header.setDurable(message.isDurable());
         header.setPriority(new UnsignedByte(message.getPriority()));
         header.setDeliveryCount(new UnsignedInteger(deliveryCount));
         header.setTtl(new UnsignedInteger((int) message.getExpiration()));
         return header;
      }
View Full Code Here

        decodeFooter();
    }

    private void decodeHeader()
    {
        _header = new Header();
        _header.setDurable(Proton.pn_message_is_durable(_impl));
        _header.setPriority(UnsignedByte.valueOf((byte) Proton.pn_message_get_priority(_impl)));
        _header.setTtl(UnsignedInteger.valueOf(Proton.pn_message_get_ttl(_impl)));
        _header.setFirstAcquirer(Proton.pn_message_is_first_acquirer(_impl));
        _header.setDeliveryCount(UnsignedInteger.valueOf(Proton.pn_message_get_delivery_count(_impl)));
View Full Code Here

    {
        if (_header == null)
        {
            if (durable)
            {
                _header = new Header();
            }
            else
            {
                return;
            }
View Full Code Here

        if (_header == null)
        {
            if (ttl != 0l)
            {
                _header = new Header();
            }
            else
            {
                return;
            }
View Full Code Here

        {
            if (deliveryCount == 0l)
            {
                return;
            }
            _header = new Header();
        }
        _header.setDeliveryCount(UnsignedInteger.valueOf(deliveryCount));
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.proton.amqp.messaging.Header

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.