Class: Qpid::Proton::Disposition
- Inherits:
-
Object
- Object
- Qpid::Proton::Disposition
- Extended by:
- Util::SWIGClassHelper
- Includes:
- State, Util::Deprecation
- Defined in:
- lib/core/disposition.rb
Defined Under Namespace
Modules: State
Constant Summary collapse
- PROTON_METHOD_PREFIX =
"pn_disposition"
Constants included from Util::SWIGClassHelper
Constants included from State
State::ACCEPTED, State::MODIFIED, State::RECEIVED, State::REJECTED, State::RELEASED
Constants included from Util::Deprecation
Util::Deprecation::DEPRECATE_FULL_TRACE, Util::Deprecation::MATCH_DIR
Instance Attribute Summary collapse
-
#failed? ⇒ Boolean
The failed flag.
- #impl ⇒ Object readonly
-
#section_number ⇒ Integer
The section number of the disposition.
-
#section_offset ⇒ Integer
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
-
#data ⇒ Codec::Data
Returns the data for the disposition.
-
#data=(data) ⇒ Object
Sets the data for the disposition.
-
#initialize(impl, local) ⇒ Disposition
constructor
A new instance of Disposition.
Methods included from Util::SWIGClassHelper
fetch_instance, get_key, proton_caller, proton_forward, proton_get, proton_is, proton_set, proton_set_get, proton_set_is, store_instance
Methods included from State
Methods included from State::ClassMethods
Methods included from Util::Deprecation
deprecated, #deprecated, included
Constructor Details
#initialize(impl, local) ⇒ Disposition
Returns a new instance of Disposition.
58 59 60 61 62 63 64 65 |
# File 'lib/core/disposition.rb', line 58 def initialize(impl, local) deprecated self.class, Delivery @impl = impl @local = local @data = nil @condition = nil @annotations = nil end |
Instance Attribute Details
#failed? ⇒ Boolean
Returns The failed flag.
83 |
# File 'lib/core/disposition.rb', line 83 proton_set_is :failed |
#impl ⇒ Object (readonly)
55 56 57 |
# File 'lib/core/disposition.rb', line 55 def impl @impl end |
#section_number ⇒ Integer
Returns The section number of the disposition.
71 |
# File 'lib/core/disposition.rb', line 71 proton_set_get :section_number |
#section_offset ⇒ Integer
Returns The section offset of the disposition.
77 |
# File 'lib/core/disposition.rb', line 77 proton_set_get :section_offset |
#undeliverable? ⇒ Boolean
Returns The undeliverable flag.
89 |
# File 'lib/core/disposition.rb', line 89 proton_set_is :undeliverable |
Instance Method Details
#annotations ⇒ Codec::Data
Returns the annotations for the disposition.
129 130 131 132 133 134 135 |
# File 'lib/core/disposition.rb', line 129 def annotations if @local @annotations else Codec::Data.to_object(Cproton.pn_disposition_annotations(@impl)) end end |
#annotations=(annotations) ⇒ Object
Sets the annotations for the disposition.
120 121 122 123 |
# File 'lib/core/disposition.rb', line 120 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.
152 153 154 155 156 157 158 |
# File 'lib/core/disposition.rb', line 152 def condition if @local @condition else Condition.convert(Cproton.pn_disposition_condition(@impl)) end end |
#condition=(condition) ⇒ Object
143 144 145 146 |
# File 'lib/core/disposition.rb', line 143 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.
106 107 108 109 110 111 112 |
# File 'lib/core/disposition.rb', line 106 def data if @local @data else Codec::Data.to_object(Cproton.pn_disposition_data(@impl)) end end |
#data=(data) ⇒ Object
Sets the data for the disposition.
97 98 99 100 |
# File 'lib/core/disposition.rb', line 97 def data=(data) raise AttributeError.new("data attribute is read-only") unless @local @data = data end |