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, id, #initialize, #size
Methods inherited from Frame
#__new__, decode, decode_header, encode, find_type, new
Instance Method Details
#body_size ⇒ Object
115
116
117
118
|
# File 'lib/amq/protocol/frame.rb', line 115
def body_size
decode_payload
@body_size
end
|
#decode_payload ⇒ Object
135
136
137
138
139
140
141
142
143
144
145
|
# File 'lib/amq/protocol/frame.rb', line 135
def decode_payload
@decoded_payload ||= begin
@klass_id, @weight = @payload.unpack(PACK_UINT16_X2)
@body_size = AMQ::Hacks.unpack_64_big_endian(@payload[4..11]).first
@data = @payload[12..-1]
@properties = Basic.decode_properties(@data)
end
end
|
#final? ⇒ Boolean
111
112
113
|
# File 'lib/amq/protocol/frame.rb', line 111
def final?
false
end
|
#klass_id ⇒ Object
125
126
127
128
|
# File 'lib/amq/protocol/frame.rb', line 125
def klass_id
decode_payload
@klass_id
end
|
#properties ⇒ Object
130
131
132
133
|
# File 'lib/amq/protocol/frame.rb', line 130
def properties
decode_payload
@properties
end
|
#weight ⇒ Object
120
121
122
123
|
# File 'lib/amq/protocol/frame.rb', line 120
def weight
decode_payload
@weight
end
|