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

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


        {
            if(contentType == null)
            {
                return;
            }
            _properties = new Properties();
        }
        _properties.setContentType(Symbol.valueOf(contentType));
    }
View Full Code Here


        {
            if(replyTo == null)
            {
                return;
            }
            _properties = new Properties();
        }
        _properties.setReplyTo(replyTo);
    }
View Full Code Here

        {
            if(correlationId == null)
            {
                return;
            }
            _properties = new Properties();
        }
        _properties.setCorrelationId(correlationId);
    }
View Full Code Here

        {
            if(messageId == null)
            {
                return;
            }
            _properties = new Properties();
        }
        _properties.setMessageId(messageId);
    }
View Full Code Here

        public Properties newInstance(Object described)
        {
            List l = (List) described;

            Properties o = new Properties();


            switch(13 - l.size())
            {

                case 0:
                    o.setReplyToGroupId( (String) l.get( 12 ) );
                case 1:
                    o.setGroupSequence( (UnsignedInteger) l.get( 11 ) );
                case 2:
                    o.setGroupId( (String) l.get( 10 ) );
                case 3:
                    o.setCreationTime( (Date) l.get( 9 ) );
                case 4:
                    o.setAbsoluteExpiryTime( (Date) l.get( 8 ) );
                case 5:
                    o.setContentEncoding( (Symbol) l.get( 7 ) );
                case 6:
                    o.setContentType( (Symbol) l.get( 6 ) );
                case 7:
                    o.setCorrelationId( (Object) l.get( 5 ) );
                case 8:
                    o.setReplyTo( (String) l.get( 4 ) );
                case 9:
                    o.setSubject( (String) l.get( 3 ) );
                case 10:
                    o.setTo( (String) l.get( 2 ) );
                case 11:
                    o.setUserId( (Binary) l.get( 1 ) );
                case 12:
                    o.setMessageId( (Object) l.get( 0 ) );
            }


            return o;
        }
View Full Code Here

         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);
         Footer footer = populateFooter(message);
         Set<SimpleString> propertyNames = message.getPropertyNames();
         for (SimpleString propertyName : propertyNames)
View Full Code Here

      }

      private static Properties populateProperties(ServerMessage message)
      {
         Calendar calendar = Calendar.getInstance();
         Properties properties = new Properties();
         TypedProperties typedProperties = message.getTypedProperties();
         properties.setMessageId(message.getMessageID());
         if (message.getAddress() != null)
         {
            properties.setTo(message.getAddress().toString());
         }
         if (typedProperties.containsProperty(USER_ID_SS))
         {
            properties.setUserId(new Binary(typedProperties.getBytesProperty(USER_ID_SS)));
         }
         if (typedProperties.containsProperty(SUBJECT_SS))
         {
            properties.setSubject(typedProperties.getSimpleStringProperty(SUBJECT_SS).toString());
         }
         if (typedProperties.containsProperty(REPLY_TO_SS))
         {
            properties.setReplyTo(typedProperties.getSimpleStringProperty(REPLY_TO_SS).toString());
         }
         if (typedProperties.containsProperty(CORRELATION_ID_SS))
         {
            properties.setCorrelationId(typedProperties.getSimpleStringProperty(CORRELATION_ID_SS).toString());
         }
         if (typedProperties.containsProperty(CONTENT_TYPE_SS))
         {
            properties.setContentType(Symbol.getSymbol(typedProperties.getSimpleStringProperty(CONTENT_TYPE_SS).toString()));
         }
         if (typedProperties.containsProperty(CONTENT_ENCODING_SS))
         {
            properties.setContentEncoding(Symbol.getSymbol(typedProperties.getSimpleStringProperty(CONTENT_ENCODING_SS).toString()));
         }
         if (typedProperties.containsProperty(ABSOLUTE_EXPIRY_TIME_SS))
         {
            calendar.setTimeInMillis(typedProperties.getLongProperty(ABSOLUTE_EXPIRY_TIME_SS));
            properties.setAbsoluteExpiryTime(calendar.getTime());
         }
         if (typedProperties.containsProperty(CREATION_TIME_SS))
         {
            calendar.setTimeInMillis(typedProperties.getLongProperty(CREATION_TIME_SS));
            properties.setCreationTime(calendar.getTime());
         }
         if (typedProperties.containsProperty(GROUP_ID_SS))
         {
            properties.setGroupId(typedProperties.getSimpleStringProperty(GROUP_ID_SS).toString());
         }
         if (typedProperties.containsProperty(GROUP_SEQUENCE_SS))
         {
            properties.setGroupSequence(new UnsignedInteger(typedProperties.getIntProperty(GROUP_SEQUENCE_SS)));
         }
         if (typedProperties.containsProperty(REPLY_TO_GROUP_ID_SS))
         {
            properties.setReplyToGroupId(typedProperties.getSimpleStringProperty(REPLY_TO_GROUP_ID_SS).toString());
         }
         return properties;
      }
View Full Code Here

TOP

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

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.