Class: Qpid::Proton::Tracker

Inherits:
Transfer show all
Defined in:
lib/core/tracker.rb

Overview

Track the Qpid::Proton::Transfer::State of a sent message.

Constant Summary

Constants inherited from Transfer

Qpid::Proton::Transfer::PROTON_METHOD_PREFIX, Qpid::Proton::Transfer::State

Constants included from Disposition::State

Disposition::State::ACCEPTED, Disposition::State::MODIFIED, Disposition::State::RECEIVED, Disposition::State::REJECTED, Disposition::State::RELEASED

Instance Method Summary collapse

Methods inherited from Transfer

#connection, #id, #initialize, #inspect, #link, #local_state, #session, #settle, #settled?, #state, #to_s, #transport, #update, #work_queue, wrap

Methods included from Disposition::State::ClassMethods

#name_of

Constructor Details

This class inherits a constructor from Qpid::Proton::Transfer

Instance Method Details

#abort

Abort a partially-sent message. The tracker can no longer be used after calling #abort.



41
42
43
# File 'lib/core/tracker.rb', line 41

def abort()
  Cproton.pn_delivery_abort(@impl)
end

#modificationsHash?

Re-delivery modifications sent by the receiver in Delivery#release

Returns:

  • (Hash)

    See the Delivery#release opts parameter.

  • (nil)

    If no modifications were requested by the receiver.



29
30
31
32
33
34
35
36
37
# File 'lib/core/tracker.rb', line 29

def modifications()
  return nil if (state != MODIFIED)
  d = Cproton.pn_delivery_remote(@impl)
  {
   :failed => Cproton.pn_disposition_is_failed(d),
   :undeliverable => Cproton.pn_disposition_is_undeliverable(d),
   :annotations => Codec::Data.to_object(Cproton.pn_disposition_annotations(d))
  }
end

#senderSender

Returns The parent Sender link.

Returns:



24
# File 'lib/core/tracker.rb', line 24

def sender() link; end