Class: AMQ::Protocol::HeaderFrame
Constant Summary
Constants inherited
from Frame
Frame::CHANNEL_RANGE, Frame::CLASSES, Frame::FINAL_OCTET, Frame::PACK_UINT64_BE, Frame::TYPES, Frame::TYPES_OPTIONS, Frame::TYPES_REVERSE
Instance Attribute Summary
#channel, #payload
Instance Method Summary
collapse
#encode, encode, #encode_to_array, id, #initialize, #size
Methods inherited from Frame
#__new__, decode, decode_header, encode, encode_to_array, encoded_payload, find_type, new
Instance Method Details
#body_size ⇒ Object
150
151
152
153
|
# File 'lib/amq/protocol/frame.rb', line 150
def body_size
decode_payload
@body_size
end
|
#decode_payload ⇒ Object
170
171
172
173
174
175
176
177
178
179
180
|
# File 'lib/amq/protocol/frame.rb', line 170
def decode_payload
@decoded_payload ||= begin
@klass_id, @weight = @payload.unpack(PACK_UINT16_X2)
@body_size = @payload.byteslice(4, 8).unpack1(PACK_UINT64_BE)
@data = @payload.byteslice(12..-1)
@properties = Basic.decode_properties(@data)
end
end
|
#final? ⇒ Boolean
146
147
148
|
# File 'lib/amq/protocol/frame.rb', line 146
def final?
false
end
|
#klass_id ⇒ Object
160
161
162
163
|
# File 'lib/amq/protocol/frame.rb', line 160
def klass_id
decode_payload
@klass_id
end
|
#properties ⇒ Object
165
166
167
168
|
# File 'lib/amq/protocol/frame.rb', line 165
def properties
decode_payload
@properties
end
|
#weight ⇒ Object
155
156
157
158
|
# File 'lib/amq/protocol/frame.rb', line 155
def weight
decode_payload
@weight
end
|