Class: AMQ::Protocol::Connection::Tune

Inherits:
Method
  • Object
show all
Defined in:
lib/amq/protocol/client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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.



430
431
432
433
434
# File 'lib/amq/protocol/client.rb', line 430

def initialize(channel_max, frame_max, heartbeat)
  @channel_max = channel_max
  @frame_max = frame_max
  @heartbeat = heartbeat
end

Instance Attribute Details

#channel_maxObject (readonly)

Returns the value of attribute channel_max.



429
430
431
# File 'lib/amq/protocol/client.rb', line 429

def channel_max
  @channel_max
end

#frame_maxObject (readonly)

Returns the value of attribute frame_max.



429
430
431
# File 'lib/amq/protocol/client.rb', line 429

def frame_max
  @frame_max
end

#heartbeatObject (readonly)

Returns the value of attribute heartbeat.



429
430
431
# File 'lib/amq/protocol/client.rb', line 429

def heartbeat
  @heartbeat
end

Class Method Details

.decode(data) ⇒ Object

Returns:



418
419
420
421
422
423
424
425
426
427
# File 'lib/amq/protocol/client.rb', line 418

def self.decode(data)
  offset = 0
  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

Returns:

  • (Boolean)


436
437
438
# File 'lib/amq/protocol/client.rb', line 436

def self.has_content?
  false
end