Пример #1
0
 def __init__(self,
              message_id=None,
              user_id=None,
              to=None,
              subject=None,
              reply_to=None,
              correlation_id=None,
              content_type=None,
              content_encoding=None,
              absolute_expiry_time=None,
              creation_time=None,
              group_id=None,
              group_sequence=None,
              reply_to_group_id=None,
              properties=None,
              encoding='UTF-8'):
     self._properties = properties if properties else c_uamqp.cProperties()
     self._encoding = encoding
     if message_id:
         self.message_id = message_id
     if user_id:
         self.user_id = user_id
     if to:
         self.to = to
     if subject:
         self.subject = subject
     if reply_to:
         self.reply_to = reply_to
     if correlation_id:
         self.correlation_id = correlation_id
     if content_type:
         self.content_type = content_type
     if content_encoding:
         self.content_encoding = content_encoding
     if absolute_expiry_time:
         self.absolute_expiry_time = absolute_expiry_time
     if creation_time:
         self.creation_time = creation_time
     if group_id:
         self.group_id = group_id
     if group_sequence:
         self.group_sequence = group_sequence
     if reply_to_group_id:
         self.reply_to_group_id = reply_to_group_id
Пример #2
0
    def get_properties_obj(self):
        """Get the underlying C reference from this object.

        :rtype: uamqp.c_uamqp.cProperties
        """
        properties = c_uamqp.cProperties()
        self._set_attr('message_id', properties)
        self._set_attr('user_id', properties)
        self._set_attr('to', properties)
        self._set_attr('subject', properties)
        self._set_attr('reply_to', properties)
        self._set_attr('correlation_id', properties)
        self._set_attr('content_type', properties)
        self._set_attr('content_encoding', properties)
        self._set_attr('absolute_expiry_time', properties)
        self._set_attr('creation_time', properties)
        self._set_attr('group_id', properties)
        self._set_attr('group_sequence', properties)
        self._set_attr('reply_to_group_id', properties)
        return properties