class Qpid::Proton::Disposition
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.
Constants
- PROTON_METHOD_PREFIX
@private
Attributes
Public Class Methods
@private
# File lib/core/disposition.rb, line 49 def initialize(impl, local) @impl = impl @local = local @data = nil @condition = nil @annotations = nil end
Public Instance Methods
Returns the annotations for the disposition.
@return [Codec::Data] The annotations.
# File lib/core/disposition.rb, line 125 def annotations if @local @annotations else data_to_object(Cproton.pn_disposition_annotations(@impl)) end end
Sets the annotations for the disposition.
@param annotations [Codec::Data] The annotations.
@raise [AttributeError] If the disposition is remote.
# File lib/core/disposition.rb, line 116 def annotations=(annotations) raise AttributeError.new("annotations attribute is read-only") unless @local @annotations = annotations end
Returns the condition of the disposition.
@return [Codec::Data] The condition of the disposition.
# File lib/core/disposition.rb, line 148 def condition if @local @condition else condition_to_object(Cproton.pn_disposition_condition(@impl)) end end
Sets the condition for the disposition.
@param condition [Codec::Data] The condition.
@raise [AttributeError] If the disposition is remote.
# File lib/core/disposition.rb, line 139 def condition=(condition) raise AttributeError.new("condition attribute is read-only") unless @local @condition = condition end
Returns the data for the disposition.
@return [Codec::Data] The data.
# File lib/core/disposition.rb, line 102 def data if @local @data else data_to_object(Cproton.pn_disposition_data(@impl)) end end
Sets the data for the disposition.
@param data [Codec::Data] The data.
@raise [AttributeError] If the disposition is remote.
# File lib/core/disposition.rb, line 93 def data=(data) raise AttributeError.new("data attribute is read-only") unless @local @data = data end