Class: GorgonAMQ::Protocol::Confirm::Select

Inherits:
Method
  • Object
show all
Defined in:
lib/gorgon_amq-protocol/lib/gorgon_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(nowait) ⇒ Select

Returns a new instance of Select.



2264
2265
2266
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 2264

def initialize(nowait)
  @nowait = nowait
end

Instance Attribute Details

#nowaitObject (readonly)

Returns the value of attribute nowait.



2263
2264
2265
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 2263

def nowait
  @nowait
end

Class Method Details

.decode(data) ⇒ Object

Returns:



2255
2256
2257
2258
2259
2260
2261
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 2255

def self.decode(data)
  offset = 0
  bit_buffer = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  nowait = (bit_buffer & (1 << 0)) != 0
  self.new(nowait)
end

.encode(channel, nowait) ⇒ Object

u’nowait = false’

Returns:



2274
2275
2276
2277
2278
2279
2280
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 2274

def self.encode(channel, nowait)
  buffer = @packed_indexes.dup
  bit_buffer = 0
  bit_buffer = bit_buffer | (1 << 0) if nowait
  buffer << [bit_buffer].pack(PACK_CHAR)
  MethodFrame.new(buffer, channel)
end

.has_content?Boolean

Returns:

  • (Boolean)


2268
2269
2270
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 2268

def self.has_content?
  false
end