コード例 #1
0
ファイル: _delivery.py プロジェクト: ChugR/qpid-proton
 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)
コード例 #2
0
ファイル: _delivery.py プロジェクト: ttrinh57/qpid-proton
 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)
コード例 #3
0
ファイル: _delivery.py プロジェクト: ffontaine/qpid-proton
    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)
コード例 #4
0
ファイル: _delivery.py プロジェクト: ffontaine/qpid-proton
    def condition(self) -> Optional['Condition']:
        """The condition object associated with a disposition.

        The :class:`Condition` object retrieved by this operation may be
        modified prior to updating a delivery. When a delivery is updated,
        the condition described by the disposition is reported to the peer
        if applicable to the current delivery state, e.g. states such as
        :const:`REJECTED`.
        """
        if self.local:
            return self._condition
        else:
            return cond2obj(pn_disposition_condition(self._impl))
コード例 #5
0
ファイル: _delivery.py プロジェクト: xzmagic/qpid-proton
 def _get_condition(self):
     if self.local:
         return self._condition
     else:
         return cond2obj(pn_disposition_condition(self._impl))
コード例 #6
0
ファイル: _delivery.py プロジェクト: ChugR/qpid-proton
 def _get_condition(self):
     if self.local:
         return self._condition
     else:
         return cond2obj(pn_disposition_condition(self._impl))