Class: Qpid::Proton::Disposition

Inherits:
Object
  • Object
show all
Includes:
State
Defined in:
lib/core/disposition.rb

Defined Under Namespace

Modules: State

Constant Summary

Constants included from State

State::ACCEPTED, State::MODIFIED, State::RECEIVED, State::REJECTED, State::RELEASED

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from State::ClassMethods

#name_of

Instance Attribute Details

#impl (readonly)



55
56
57
# File 'lib/core/disposition.rb', line 55

def impl
  @impl
end

Instance Method Details

#annotationsCodec::Data

Returns the annotations for the disposition.

Returns:

  • (Codec::Data)

    The annotations.



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)

Sets the annotations for the disposition.

Parameters:

  • annotations (Codec::Data)

    The annotations.

Raises:



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

#conditionCodec::Data

Returns the condition of the disposition.

Returns:

  • (Codec::Data)

    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)

Parameters:

  • condition (Codec::Data)

    The condition.

Raises:



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

#dataCodec::Data

Returns the data for the disposition.

Returns:

  • (Codec::Data)

    The data.



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)

Sets the data for the disposition.

Parameters:

  • data (Codec::Data)

    The data.

Raises:



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