Class: AMQ::Protocol::HeaderFrame
Constant Summary
Constants inherited
from Frame
Frame::CHANNEL_RANGE, Frame::CLASSES, Frame::FINAL_OCTET, 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
144
145
146
147
|
# File 'lib/amq/protocol/frame.rb', line 144
def body_size
decode_payload
@body_size
end
|
#decode_payload ⇒ Object
164
165
166
167
168
169
170
171
172
173
174
|
# File 'lib/amq/protocol/frame.rb', line 164
def decode_payload
@decoded_payload ||= begin
@klass_id, @weight = @payload.unpack(PACK_UINT16_X2)
@body_size = AMQ::Hacks.unpack_uint64_big_endian(@payload[4..11]).first
@data = @payload[12..-1]
@properties = Basic.decode_properties(@data)
end
end
|
#final? ⇒ Boolean
140
141
142
|
# File 'lib/amq/protocol/frame.rb', line 140
def final?
false
end
|
#klass_id ⇒ Object
154
155
156
157
|
# File 'lib/amq/protocol/frame.rb', line 154
def klass_id
decode_payload
@klass_id
end
|
#properties ⇒ Object
159
160
161
162
|
# File 'lib/amq/protocol/frame.rb', line 159
def properties
decode_payload
@properties
end
|
#weight ⇒ Object
149
150
151
152
|
# File 'lib/amq/protocol/frame.rb', line 149
def weight
decode_payload
@weight
end
|