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)
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)
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)
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))
def _get_condition(self): if self.local: return self._condition else: return cond2obj(pn_disposition_condition(self._impl))
def _get_condition(self): if self.local: return self._condition else: return cond2obj(pn_disposition_condition(self._impl))