Class: Qpid::Proton::Transfer
- Inherits:
-
Object
- Object
- Qpid::Proton::Transfer
- Includes:
- Disposition::State
- Defined in:
- lib/core/transfer.rb
Overview
Constant Summary collapse
- PROTON_METHOD_PREFIX =
"pn_delivery"
- State =
Disposition::State
Constants included from Disposition::State
Disposition::State::ACCEPTED, Disposition::State::MODIFIED, Disposition::State::RECEIVED, Disposition::State::REJECTED, Disposition::State::RELEASED
Class Method Summary collapse
Instance Method Summary collapse
-
#connection ⇒ Connection
The parent connection.
-
#id ⇒ String
Unique ID for the transfer in the context of the #link.
-
#initialize(impl) ⇒ Transfer
constructor
A new instance of Transfer.
- #inspect
-
#link ⇒ Link
The parent link.
-
#local_state
deprecated
Deprecated.
internal use only
-
#session ⇒ Session
The parent session.
-
#settle(state = nil)
deprecated
Deprecated.
internal use only
-
#settled? ⇒ Boolean
True if the transfer is remotely settled.
-
#state ⇒ Integer
Remote state of the transfer, one of the values in State.
- #to_s
-
#transport ⇒ Transport
The parent connection’s transport.
-
#update(state)
deprecated
Deprecated.
internal use only
-
#work_queue ⇒ WorkQueue
The parent connection’s work-queue.
Methods included from Disposition::State::ClassMethods
Constructor Details
#initialize(impl) ⇒ Transfer
Returns a new instance of Transfer.
37 38 39 40 41 |
# File 'lib/core/transfer.rb', line 37 def initialize(impl) @impl = impl @inspect = nil self.class.store_instance(self, :pn_delivery_attachments) end |
Class Method Details
Instance Method Details
#connection ⇒ Connection
Returns The parent connection.
67 |
# File 'lib/core/transfer.rb', line 67 def connection() self.session.connection; end |
#id ⇒ String
Returns Unique ID for the transfer in the context of the #link.
49 |
# File 'lib/core/transfer.rb', line 49 def id() Cproton.pn_delivery_tag(@impl); end |
#inspect
102 |
# File 'lib/core/transfer.rb', line 102 def inspect() @inspect || super; end |
#link ⇒ Link
Returns The parent link.
61 |
# File 'lib/core/transfer.rb', line 61 def link() Link.wrap(Cproton.pn_delivery_link(@impl)); end |
#local_state
internal use only
92 |
# File 'lib/core/transfer.rb', line 92 def local_state() Cproton.pn_delivery_local_state(@impl); end |
#session ⇒ Session
Returns The parent session.
64 |
# File 'lib/core/transfer.rb', line 64 def session() link.session; end |
#settle(state = nil)
internal use only
96 97 98 99 100 |
# 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 |
#settled? ⇒ Boolean
Returns True if the transfer is remotely settled.
55 |
# File 'lib/core/transfer.rb', line 55 proton_caller :settled? |
#state ⇒ Integer
Returns Remote state of the transfer, one of the values in State.
58 |
# File 'lib/core/transfer.rb', line 58 def state() Cproton.pn_delivery_remote_state(@impl); end |
#to_s
103 |
# File 'lib/core/transfer.rb', line 103 def to_s() inspect; end |
#transport ⇒ Transport
Returns The parent connection’s transport.
70 |
# File 'lib/core/transfer.rb', line 70 def transport() self.connection.transport; end |
#update(state)
internal use only
88 |
# File 'lib/core/transfer.rb', line 88 def update(state) Cproton.pn_delivery_update(@impl, state); end |
#work_queue ⇒ WorkQueue
Returns The parent connection’s work-queue.
73 |
# File 'lib/core/transfer.rb', line 73 def work_queue() self.connection.work_queue; end |