Exemple #1
0
 def update(self, state):
     """
     Set the local state of the delivery e.g. ACCEPTED, REJECTED, RELEASED.
     """
     obj2dat(self.local._data, pn_disposition_data(self.local._impl))
     obj2dat(self.local._annotations, pn_disposition_annotations(self.local._impl))
     obj2cond(self.local._condition, pn_disposition_condition(self.local._impl))
     pn_delivery_update(self._impl, state)
Exemple #2
0
 def update(self, state):
     """
     Set the local state of the delivery e.g. ACCEPTED, REJECTED, RELEASED.
     """
     obj2dat(self.local._data, pn_disposition_data(self.local._impl))
     obj2dat(self.local._annotations, pn_disposition_annotations(self.local._impl))
     obj2cond(self.local._condition, pn_disposition_condition(self.local._impl))
     pn_delivery_update(self._impl, state)
Exemple #3
0
    def update(self, state: Union[int, DispositionType]) -> None:
        """
        Set the local state of the delivery e.g. :const:`ACCEPTED`,
        :const:`REJECTED`, :const:`RELEASED`.

        :param state: State of delivery
        """
        obj2dat(self.local._data, pn_disposition_data(self.local._impl))
        obj2dat(self.local._annotations, pn_disposition_annotations(self.local._impl))
        obj2cond(self.local._condition, pn_disposition_condition(self.local._impl))
        pn_delivery_update(self._impl, state)
Exemple #4
0
    def data(self) -> Optional[List[int]]:
        """Access the disposition as a :class:`Data` object.

        Dispositions are an extension point in the AMQP protocol. The
        disposition interface provides setters/getters for those
        dispositions that are predefined by the specification, however
        access to the raw disposition data is provided so that other
        dispositions can be used.

        The :class:`Data` object returned by this operation is valid until
        the parent delivery is settled.
        """
        if self.local:
            return self._data
        else:
            return dat2obj(pn_disposition_data(self._impl))
Exemple #5
0
 def _get_data(self):
     if self.local:
         return self._data
     else:
         return dat2obj(pn_disposition_data(self._impl))
Exemple #6
0
 def _get_data(self):
     if self.local:
         return self._data
     else:
         return dat2obj(pn_disposition_data(self._impl))