Class: AMQ::Protocol::Connection::Start
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#locales ⇒ Object
readonly
Returns the value of attribute locales.
-
#mechanisms ⇒ Object
readonly
Returns the value of attribute mechanisms.
-
#server_properties ⇒ Object
readonly
Returns the value of attribute server_properties.
-
#version_major ⇒ Object
readonly
Returns the value of attribute version_major.
-
#version_minor ⇒ Object
readonly
Returns the value of attribute version_minor.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(version_major, version_minor, server_properties, mechanisms, locales) ⇒ Start
constructor
A new instance of Start.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(version_major, version_minor, server_properties, mechanisms, locales) ⇒ Start
Returns a new instance of Start.
227 228 229 230 231 232 233 |
# File 'lib/amq/protocol/client.rb', line 227 def initialize(version_major, version_minor, server_properties, mechanisms, locales) @version_major = version_major @version_minor = version_minor @server_properties = server_properties @mechanisms = mechanisms @locales = locales end |
Instance Attribute Details
#locales ⇒ Object (readonly)
Returns the value of attribute locales.
226 227 228 |
# File 'lib/amq/protocol/client.rb', line 226 def locales @locales end |
#mechanisms ⇒ Object (readonly)
Returns the value of attribute mechanisms.
226 227 228 |
# File 'lib/amq/protocol/client.rb', line 226 def mechanisms @mechanisms end |
#server_properties ⇒ Object (readonly)
Returns the value of attribute server_properties.
226 227 228 |
# File 'lib/amq/protocol/client.rb', line 226 def server_properties @server_properties end |
#version_major ⇒ Object (readonly)
Returns the value of attribute version_major.
226 227 228 |
# File 'lib/amq/protocol/client.rb', line 226 def version_major @version_major end |
#version_minor ⇒ Object (readonly)
Returns the value of attribute version_minor.
226 227 228 |
# File 'lib/amq/protocol/client.rb', line 226 def version_minor @version_minor end |
Class Method Details
.decode(data) ⇒ Object
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/amq/protocol/client.rb', line 206 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 version_major = data[offset, 1].unpack(PACK_CHAR).first offset += 1 version_minor = data[offset, 1].unpack(PACK_CHAR).first offset += 1 table_length = Table.length(data[offset, 4]) server_properties = Table.decode(data[offset, table_length + 4]) offset += table_length + 4 length = data[offset, 4].unpack(PACK_UINT32).first offset += 4 mechanisms = data[offset, length] offset += length length = data[offset, 4].unpack(PACK_UINT32).first offset += 4 locales = data[offset, length] offset += length self.new(version_major, version_minor, server_properties, mechanisms, locales) end |
.has_content? ⇒ Boolean
235 236 237 |
# File 'lib/amq/protocol/client.rb', line 235 def self.has_content? false end |