Status of a message transfer on a {Link} Common base class for {Tracker} and {Delivery}.
@!private
# File lib/core/transfer.rb, line 37 def initialize(impl) @impl = impl @inspect = nil self.class.store_instance(self, :pn_delivery_attachments) end
# File lib/core/transfer.rb, line 31 def self.wrap(impl) return unless impl self.fetch_instance(impl, :pn_delivery_attachments) || (Cproton.pn_link_is_sender(Cproton.pn_delivery_link(impl)) ? Tracker : Delivery).new(impl) end
@return [Connection] The parent connection.
# File lib/core/transfer.rb, line 86 def connection() self.session.connection; end
@return [String] Unique ID for the transfer in the context of the {#link}
# File lib/core/transfer.rb, line 68 def id() Cproton.pn_delivery_tag(@impl); end
# File lib/core/transfer.rb, line 121 def inspect() @inspect || super; end
@return [Link] The parent link.
# File lib/core/transfer.rb, line 80 def link() Link.wrap(Cproton.pn_delivery_link(@impl)); end
@deprecated internal use only
# File lib/core/transfer.rb, line 111 def local_state() Cproton.pn_delivery_local_state(@impl); end
@return [Session] The parent session.
# File lib/core/transfer.rb, line 83 def session() link.session; end
@deprecated internal use only
# File lib/core/transfer.rb, line 115 def settle(state = nil) update(state) unless state.nil? Cproton.pn_delivery_settle(@impl) @inspect = inspect # Save the inspect string, the delivery pointer will go bad. end
@return [Integer] Remote state of the transfer, one of the values in {State}
# File lib/core/transfer.rb, line 77 def state() Cproton.pn_delivery_remote_state(@impl); end
# File lib/core/transfer.rb, line 122 def to_s() inspect; end
@return [Transport] The parent connection's transport.
# File lib/core/transfer.rb, line 89 def transport() self.connection.transport; end
@deprecated internal use only
# File lib/core/transfer.rb, line 107 def update(state) Cproton.pn_delivery_update(@impl, state); end
@return [WorkQueue] The parent connection's work-queue.
# File lib/core/transfer.rb, line 92 def work_queue() self.connection.work_queue; end