Class: AMQ::Protocol::Connection::Tune
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#channel_max ⇒ Object
readonly
Returns the value of attribute channel_max.
-
#frame_max ⇒ Object
readonly
Returns the value of attribute frame_max.
-
#heartbeat ⇒ Object
readonly
Returns the value of attribute heartbeat.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(channel_max, frame_max, heartbeat) ⇒ Tune
constructor
A new instance of Tune.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(channel_max, frame_max, heartbeat) ⇒ Tune
Returns a new instance of Tune.
340 341 342 343 344 |
# File 'lib/amq/protocol/client.rb', line 340 def initialize(channel_max, frame_max, heartbeat) @channel_max = channel_max @frame_max = frame_max @heartbeat = heartbeat end |
Instance Attribute Details
#channel_max ⇒ Object (readonly)
Returns the value of attribute channel_max.
339 340 341 |
# File 'lib/amq/protocol/client.rb', line 339 def channel_max @channel_max end |
#frame_max ⇒ Object (readonly)
Returns the value of attribute frame_max.
339 340 341 |
# File 'lib/amq/protocol/client.rb', line 339 def frame_max @frame_max end |
#heartbeat ⇒ Object (readonly)
Returns the value of attribute heartbeat.
339 340 341 |
# File 'lib/amq/protocol/client.rb', line 339 def heartbeat @heartbeat end |
Class Method Details
.decode(data) ⇒ Object
328 329 330 331 332 333 334 335 336 337 |
# File 'lib/amq/protocol/client.rb', line 328 def self.decode(data) offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method channel_max = data[offset, 2].unpack(PACK_UINT16).first offset += 2 frame_max = data[offset, 4].unpack(PACK_UINT32).first offset += 4 heartbeat = data[offset, 2].unpack(PACK_UINT16).first offset += 2 self.new(channel_max, frame_max, heartbeat) end |
.has_content? ⇒ Boolean
346 347 348 |
# File 'lib/amq/protocol/client.rb', line 346 def self.has_content? false end |