Class: Qpid::Proton::Disposition
- Inherits:
-
Object
- Object
- Qpid::Proton::Disposition
- Defined in:
- lib/core/disposition.rb
Overview
Disposition records the current state and/or final outcome of a transfer.
Every delivery contains both a local and a remote disposition. The local disposition holds the local state of the delivery, and the remote disposition holds the *last known* remote state of the delivery.
Instance Attribute Summary collapse
-
#failed? ⇒ Boolean
The failed flag.
-
#impl ⇒ Object
readonly
Returns the value of attribute impl.
-
#section_number ⇒ Fixnum
The section number of the disposition.
-
#section_offset ⇒ Fixnum
The section offset of the disposition.
-
#undeliverable? ⇒ Boolean
The undeliverable flag.
Instance Method Summary collapse
-
#annotations ⇒ Codec::Data
Returns the annotations for the disposition.
-
#annotations=(annotations) ⇒ Object
Sets the annotations for the disposition.
-
#condition ⇒ Codec::Data
Returns the condition of the disposition.
-
#condition=(condition) ⇒ Object
Sets the condition for the disposition.
-
#data ⇒ Codec::Data
Returns the data for the disposition.
-
#data=(data) ⇒ Object
Sets the data for the disposition.
Instance Attribute Details
#failed? ⇒ Boolean
Returns The failed flag.
79 |
# File 'lib/core/disposition.rb', line 79 proton_accessor :failed, :is_or_get => :is |
#impl ⇒ Object (readonly)
Returns the value of attribute impl.
46 47 48 |
# File 'lib/core/disposition.rb', line 46 def impl @impl end |
#section_number ⇒ Fixnum
Returns The section number of the disposition.
67 |
# File 'lib/core/disposition.rb', line 67 proton_accessor :section_number |
#section_offset ⇒ Fixnum
Returns The section offset of the disposition.
73 |
# File 'lib/core/disposition.rb', line 73 proton_accessor :section_offset |
#undeliverable? ⇒ Boolean
Returns The undeliverable flag.
85 |
# File 'lib/core/disposition.rb', line 85 proton_accessor :undeliverable, :is_or_get => :is |
Instance Method Details
#annotations ⇒ Codec::Data
Returns the annotations for the disposition.
125 126 127 128 129 130 131 |
# File 'lib/core/disposition.rb', line 125 def annotations if @local @annotations else data_to_object(Cproton.pn_disposition_annotations(@impl)) end end |
#annotations=(annotations) ⇒ Object
Sets the annotations for the disposition.
116 117 118 119 |
# File 'lib/core/disposition.rb', line 116 def annotations=(annotations) raise AttributeError.new("annotations attribute is read-only") unless @local @annotations = annotations end |
#condition ⇒ Codec::Data
Returns the condition of the disposition.
148 149 150 151 152 153 154 |
# File 'lib/core/disposition.rb', line 148 def condition if @local @condition else condition_to_object(Cproton.pn_disposition_condition(@impl)) end end |
#condition=(condition) ⇒ Object
Sets the condition for the disposition.
139 140 141 142 |
# File 'lib/core/disposition.rb', line 139 def condition=(condition) raise AttributeError.new("condition attribute is read-only") unless @local @condition = condition end |
#data ⇒ Codec::Data
Returns the data for the disposition.
102 103 104 105 106 107 108 |
# File 'lib/core/disposition.rb', line 102 def data if @local @data else data_to_object(Cproton.pn_disposition_data(@impl)) end end |
#data=(data) ⇒ Object
Sets the data for the disposition.
93 94 95 96 |
# File 'lib/core/disposition.rb', line 93 def data=(data) raise AttributeError.new("data attribute is read-only") unless @local @data = data end |