Class: Qpid::Proton::Disposition

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Instance Attribute Details

#failed?Boolean

Returns The failed flag.

Returns:

  • (Boolean)

    The failed flag.



79
# File 'lib/core/disposition.rb', line 79

proton_accessor :failed, :is_or_get => :is

#implObject (readonly)

Returns the value of attribute impl.



46
47
48
# File 'lib/core/disposition.rb', line 46

def impl
  @impl
end

#section_numberFixnum

Returns The section number of the disposition.

Returns:

  • (Fixnum)

    The section number of the disposition.



67
# File 'lib/core/disposition.rb', line 67

proton_accessor :section_number

#section_offsetFixnum

Returns The section offset of the disposition.

Returns:

  • (Fixnum)

    The section offset of the disposition.



73
# File 'lib/core/disposition.rb', line 73

proton_accessor :section_offset

#undeliverable?Boolean

Returns The undeliverable flag.

Returns:

  • (Boolean)

    The undeliverable flag.



85
# File 'lib/core/disposition.rb', line 85

proton_accessor :undeliverable, :is_or_get => :is

Instance Method Details

#annotationsCodec::Data

Returns the annotations for the disposition.

Returns:



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.

Parameters:

Raises:



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

#conditionCodec::Data

Returns the condition of the disposition.

Returns:



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.

Parameters:

Raises:



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

#dataCodec::Data

Returns the data for the disposition.

Returns:



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.

Parameters:

Raises:



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