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.



440
441
442
443
444
# File 'lib/amq/protocol/client.rb', line 440

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.



439
440
441
# File 'lib/amq/protocol/client.rb', line 439

def channel_max
  @channel_max
end

#frame_maxObject (readonly)

Returns the value of attribute frame_max.



439
440
441
# File 'lib/amq/protocol/client.rb', line 439

def frame_max
  @frame_max
end

#heartbeatObject (readonly)

Returns the value of attribute heartbeat.



439
440
441
# File 'lib/amq/protocol/client.rb', line 439

def heartbeat
  @heartbeat
end

Class Method Details

.decode(data) ⇒ Object

Returns:



428
429
430
431
432
433
434
435
436
437
# File 'lib/amq/protocol/client.rb', line 428

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)


446
447
448
# File 'lib/amq/protocol/client.rb', line 446

def self.has_content?
  false
end