Class: AMQ::Protocol::MethodFrame

Inherits:
FrameSubclass show all
Defined in:
lib/amq/protocol/frame.rb

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

Attributes inherited from FrameSubclass

#channel, #payload

Instance Method Summary collapse

Methods inherited from FrameSubclass

#encode, encode, id, #initialize, #size

Methods inherited from Frame

#__new__, decode, decode_header, encode, find_type, new

Constructor Details

This class inherits a constructor from AMQ::Protocol::FrameSubclass

Instance Method Details

#decode_payloadObject

final?



98
99
100
# File 'lib/amq/protocol/frame.rb', line 98

def decode_payload
  self.method_class.decode(@payload[4..-1])
end

#final?Boolean

Returns:

  • (Boolean)


94
95
96
# File 'lib/amq/protocol/frame.rb', line 94

def final?
  !self.method_class.has_content?
end

#method_classObject



86
87
88
89
90
91
92
# File 'lib/amq/protocol/frame.rb', line 86

def method_class
  @method_class ||= begin
                      klass_id, method_id = self.payload.unpack(PACK_UINT16_X2)
                      index               = klass_id << 16 | method_id
                      AMQ::Protocol::METHODS[index]
                    end
end