class Qpid::Proton::Transfer

Status of a message transfer on a {Link} Common base class for {Tracker} and {Delivery}.

Constants

PROTON_METHOD_PREFIX

@!private

State

Public Class Methods

new(impl) click to toggle source
# File lib/core/transfer.rb, line 37
def initialize(impl)
  @impl = impl
  @inspect = nil
  self.class.store_instance(self, :pn_delivery_attachments)
end
wrap(impl) click to toggle source
# 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

Public Instance Methods

connection() click to toggle source

@return [Connection] The parent connection.

# File lib/core/transfer.rb, line 67
def connection() self.session.connection; end
id() click to toggle source

@return [String] Unique ID for the transfer in the context of the {#link}

# File lib/core/transfer.rb, line 49
def id() Cproton.pn_delivery_tag(@impl); end
inspect() click to toggle source
Calls superclass method Qpid::Proton::Util::Wrapper#inspect
# File lib/core/transfer.rb, line 102
def inspect() @inspect || super; end
local_state() click to toggle source

@deprecated internal use only

# File lib/core/transfer.rb, line 92
def local_state() Cproton.pn_delivery_local_state(@impl); end
session() click to toggle source

@return [Session] The parent session.

# File lib/core/transfer.rb, line 64
def session() link.session; end
settle(state = nil) click to toggle source

@deprecated internal use only

# File lib/core/transfer.rb, line 96
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
state() click to toggle source

@return [Integer] Remote state of the transfer, one of the values in {State}

# File lib/core/transfer.rb, line 58
def state() Cproton.pn_delivery_remote_state(@impl); end
to_s() click to toggle source
# File lib/core/transfer.rb, line 103
def to_s() inspect; end
transport() click to toggle source

@return [Transport] The parent connection's transport.

# File lib/core/transfer.rb, line 70
def transport() self.connection.transport; end
update(state) click to toggle source

@deprecated internal use only

# File lib/core/transfer.rb, line 88
def update(state) Cproton.pn_delivery_update(@impl, state); end
work_queue() click to toggle source

@return [WorkQueue] The parent connection's work-queue.

# File lib/core/transfer.rb, line 73
def work_queue() self.connection.work_queue; end