@@ -251,7 +251,7 @@ def self.has_content?
251
251
end
252
252
253
253
# @return
254
- # ['client_properties = nil', "mechanism = 'PLAIN'", 'response = nil', "locale = 'en_US'"]
254
+ # [u 'client_properties = nil', u "mechanism = u 'PLAIN'", u 'response = nil', u "locale = u 'en_US'"]
255
255
def self . encode ( client_properties , mechanism , response , locale )
256
256
channel = 0
257
257
buffer = @packed_indexes . dup
@@ -307,7 +307,7 @@ def self.has_content?
307
307
end
308
308
309
309
# @return
310
- # ['response = nil']
310
+ # [u 'response = nil']
311
311
def self . encode ( response )
312
312
channel = 0
313
313
buffer = @packed_indexes . dup
@@ -362,7 +362,7 @@ def self.has_content?
362
362
end
363
363
364
364
# @return
365
- # ['channel_max = false', 'frame_max = false', 'heartbeat = false']
365
+ # [u 'channel_max = false', u 'frame_max = false', u 'heartbeat = false']
366
366
def self . encode ( channel_max , frame_max , heartbeat )
367
367
channel = 0
368
368
buffer = @packed_indexes . dup
@@ -386,7 +386,7 @@ def self.has_content?
386
386
end
387
387
388
388
# @return
389
- # ["virtual_host = '/'", 'capabilities = EMPTY_STRING', 'insist = false']
389
+ # [u "virtual_host = u '/'", u 'capabilities = EMPTY_STRING', u 'insist = false']
390
390
def self . encode ( virtual_host )
391
391
capabilities = EMPTY_STRING
392
392
insist = false
@@ -467,7 +467,7 @@ def self.has_content?
467
467
end
468
468
469
469
# @return
470
- # ['reply_code = nil', 'reply_text = EMPTY_STRING', 'class_id = nil', 'method_id = nil']
470
+ # [u 'reply_code = nil', u 'reply_text = EMPTY_STRING', u 'class_id = nil', u 'method_id = nil']
471
471
def self . encode ( reply_code , reply_text , class_id , method_id )
472
472
channel = 0
473
473
buffer = @packed_indexes . dup
@@ -536,7 +536,7 @@ def self.has_content?
536
536
end
537
537
538
538
# @return
539
- # ['reason = EMPTY_STRING']
539
+ # [u 'reason = EMPTY_STRING']
540
540
def self . encode ( reason )
541
541
channel = 0
542
542
buffer = @packed_indexes . dup
@@ -576,6 +576,79 @@ def self.encode()
576
576
577
577
end
578
578
579
+ class UpdateSecret < Protocol ::Method
580
+ @name = "connection.update-secret"
581
+ @method_id = 70
582
+ @index = 0x000A0046 # 10, 70, 655430
583
+ @packed_indexes = [ 10 , 70 ] . pack ( PACK_UINT16_X2 ) . freeze
584
+
585
+ # @return
586
+ def self . decode ( data )
587
+ offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method
588
+ length = data [ offset , 4 ] . unpack ( PACK_UINT32 ) . first
589
+ offset += 4
590
+ new_secret = data [ offset , length ]
591
+ offset += length
592
+ length = data [ offset , 1 ] . unpack ( PACK_CHAR ) . first
593
+ offset += 1
594
+ reason = data [ offset , length ]
595
+ offset += length
596
+ self . new ( new_secret , reason )
597
+ end
598
+
599
+ attr_reader :new_secret , :reason
600
+ def initialize ( new_secret , reason )
601
+ @new_secret = new_secret
602
+ @reason = reason
603
+ end
604
+
605
+ def self . has_content?
606
+ false
607
+ end
608
+
609
+ # @return
610
+ # [u'new_secret = nil', u'reason = nil']
611
+ def self . encode ( new_secret , reason )
612
+ channel = 0
613
+ buffer = @packed_indexes . dup
614
+ buffer << [ new_secret . to_s . bytesize ] . pack ( PACK_UINT32 )
615
+ buffer << new_secret . to_s
616
+ buffer << reason . to_s . bytesize . chr
617
+ buffer << reason . to_s
618
+ MethodFrame . new ( buffer , channel )
619
+ end
620
+
621
+ end
622
+
623
+ class UpdateSecretOk < Protocol ::Method
624
+ @name = "connection.update-secret-ok"
625
+ @method_id = 71
626
+ @index = 0x000A0047 # 10, 71, 655431
627
+ @packed_indexes = [ 10 , 71 ] . pack ( PACK_UINT16_X2 ) . freeze
628
+
629
+ # @return
630
+ def self . decode ( data )
631
+ offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method
632
+ self . new ( )
633
+ end
634
+
635
+ def initialize ( )
636
+ end
637
+
638
+ def self . has_content?
639
+ false
640
+ end
641
+
642
+ # @return
643
+ # []
644
+ def self . encode ( )
645
+ channel = 0
646
+ buffer = @packed_indexes . dup
647
+ MethodFrame . new ( buffer , channel )
648
+ end
649
+
650
+ end
651
+
579
652
end
580
653
581
654
class Channel < Protocol ::Class
@@ -596,7 +669,7 @@ def self.has_content?
596
669
end
597
670
598
671
# @return
599
- # ['out_of_band = EMPTY_STRING']
672
+ # [u 'out_of_band = EMPTY_STRING']
600
673
def self . encode ( channel , out_of_band )
601
674
buffer = @packed_indexes . dup
602
675
buffer << out_of_band . to_s . bytesize . chr
@@ -659,7 +732,7 @@ def self.has_content?
659
732
end
660
733
661
734
# @return
662
- # ['active = nil']
735
+ # [u 'active = nil']
663
736
def self . encode ( channel , active )
664
737
buffer = @packed_indexes . dup
665
738
bit_buffer = 0
@@ -695,7 +768,7 @@ def self.has_content?
695
768
end
696
769
697
770
# @return
698
- # ['active = nil']
771
+ # [u 'active = nil']
699
772
def self . encode ( channel , active )
700
773
buffer = @packed_indexes . dup
701
774
bit_buffer = 0
@@ -741,7 +814,7 @@ def self.has_content?
741
814
end
742
815
743
816
# @return
744
- # ['reply_code = nil', 'reply_text = EMPTY_STRING', 'class_id = nil', 'method_id = nil']
817
+ # [u 'reply_code = nil', u 'reply_text = EMPTY_STRING', u 'class_id = nil', u 'method_id = nil']
745
818
def self . encode ( channel , reply_code , reply_text , class_id , method_id )
746
819
buffer = @packed_indexes . dup
747
820
buffer << [ reply_code ] . pack ( PACK_UINT16 )
@@ -802,7 +875,7 @@ def self.has_content?
802
875
end
803
876
804
877
# @return
805
- # ['ticket = 0', 'exchange = nil', "type = 'direct'", 'passive = false', 'durable = false', 'auto_delete = false', 'internal = false', 'nowait = false', 'arguments = {}']
878
+ # [u 'ticket = 0', u 'exchange = nil', u "type = u 'direct'", u 'passive = false', u 'durable = false', u 'auto_delete = false', u 'internal = false', u 'nowait = false', u 'arguments = {}']
806
879
def self . encode ( channel , exchange , type , passive , durable , auto_delete , internal , nowait , arguments )
807
880
ticket = 0
808
881
buffer = @packed_indexes . dup
@@ -858,7 +931,7 @@ def self.has_content?
858
931
end
859
932
860
933
# @return
861
- # ['ticket = 0', 'exchange = nil', 'if_unused = false', 'nowait = false']
934
+ # [u 'ticket = 0', u 'exchange = nil', u 'if_unused = false', u 'nowait = false']
862
935
def self . encode ( channel , exchange , if_unused , nowait )
863
936
ticket = 0
864
937
buffer = @packed_indexes . dup
@@ -908,7 +981,7 @@ def self.has_content?
908
981
end
909
982
910
983
# @return
911
- # ['ticket = 0', 'destination = nil', 'source = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
984
+ # [u 'ticket = 0', u 'destination = nil', u 'source = nil', u 'routing_key = EMPTY_STRING', u 'nowait = false', u 'arguments = {}']
912
985
def self . encode ( channel , destination , source , routing_key , nowait , arguments )
913
986
ticket = 0
914
987
buffer = @packed_indexes . dup
@@ -962,7 +1035,7 @@ def self.has_content?
962
1035
end
963
1036
964
1037
# @return
965
- # ['ticket = 0', 'destination = nil', 'source = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
1038
+ # [u 'ticket = 0', u 'destination = nil', u 'source = nil', u 'routing_key = EMPTY_STRING', u 'nowait = false', u 'arguments = {}']
966
1039
def self . encode ( channel , destination , source , routing_key , nowait , arguments )
967
1040
ticket = 0
968
1041
buffer = @packed_indexes . dup
@@ -1024,7 +1097,7 @@ def self.has_content?
1024
1097
end
1025
1098
1026
1099
# @return
1027
- # ['ticket = 0', 'queue = EMPTY_STRING', 'passive = false', 'durable = false', 'exclusive = false', 'auto_delete = false', 'nowait = false', 'arguments = {}']
1100
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'passive = false', u 'durable = false', u 'exclusive = false', u 'auto_delete = false', u 'nowait = false', u 'arguments = {}']
1028
1101
def self . encode ( channel , queue , passive , durable , exclusive , auto_delete , nowait , arguments )
1029
1102
ticket = 0
1030
1103
buffer = @packed_indexes . dup
@@ -1090,7 +1163,7 @@ def self.has_content?
1090
1163
end
1091
1164
1092
1165
# @return
1093
- # ['ticket = 0', 'queue = EMPTY_STRING', 'exchange = nil', 'routing_key = EMPTY_STRING', 'nowait = false', 'arguments = {}']
1166
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'exchange = nil', u 'routing_key = EMPTY_STRING', u 'nowait = false', u 'arguments = {}']
1094
1167
def self . encode ( channel , queue , exchange , routing_key , nowait , arguments )
1095
1168
ticket = 0
1096
1169
buffer = @packed_indexes . dup
@@ -1144,7 +1217,7 @@ def self.has_content?
1144
1217
end
1145
1218
1146
1219
# @return
1147
- # ['ticket = 0', 'queue = EMPTY_STRING', 'nowait = false']
1220
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'nowait = false']
1148
1221
def self . encode ( channel , queue , nowait )
1149
1222
ticket = 0
1150
1223
buffer = @packed_indexes . dup
@@ -1197,7 +1270,7 @@ def self.has_content?
1197
1270
end
1198
1271
1199
1272
# @return
1200
- # ['ticket = 0', 'queue = EMPTY_STRING', 'if_unused = false', 'if_empty = false', 'nowait = false']
1273
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'if_unused = false', u 'if_empty = false', u 'nowait = false']
1201
1274
def self . encode ( channel , queue , if_unused , if_empty , nowait )
1202
1275
ticket = 0
1203
1276
buffer = @packed_indexes . dup
@@ -1252,7 +1325,7 @@ def self.has_content?
1252
1325
end
1253
1326
1254
1327
# @return
1255
- # ['ticket = 0', 'queue = EMPTY_STRING', 'exchange = nil', 'routing_key = EMPTY_STRING', 'arguments = {}']
1328
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'exchange = nil', u 'routing_key = EMPTY_STRING', u 'arguments = {}']
1256
1329
def self . encode ( channel , queue , exchange , routing_key , arguments )
1257
1330
ticket = 0
1258
1331
buffer = @packed_indexes . dup
@@ -1540,7 +1613,7 @@ def self.has_content?
1540
1613
end
1541
1614
1542
1615
# @return
1543
- # ['prefetch_size = false', 'prefetch_count = false', 'global = false']
1616
+ # [u 'prefetch_size = false', u 'prefetch_count = false', u 'global = false']
1544
1617
def self . encode ( channel , prefetch_size , prefetch_count , global )
1545
1618
buffer = @packed_indexes . dup
1546
1619
buffer << [ prefetch_size ] . pack ( PACK_UINT32 )
@@ -1587,7 +1660,7 @@ def self.has_content?
1587
1660
end
1588
1661
1589
1662
# @return
1590
- # ['ticket = 0', 'queue = EMPTY_STRING', 'consumer_tag = EMPTY_STRING', 'no_local = false', 'no_ack = false', 'exclusive = false', 'nowait = false', 'arguments = {}']
1663
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'consumer_tag = EMPTY_STRING', u 'no_local = false', u 'no_ack = false', u 'exclusive = false', u 'nowait = false', u 'arguments = {}']
1591
1664
def self . encode ( channel , queue , consumer_tag , no_local , no_ack , exclusive , nowait , arguments )
1592
1665
ticket = 0
1593
1666
buffer = @packed_indexes . dup
@@ -1666,7 +1739,7 @@ def self.has_content?
1666
1739
end
1667
1740
1668
1741
# @return
1669
- # ['consumer_tag = nil', 'nowait = false']
1742
+ # [u 'consumer_tag = nil', u 'nowait = false']
1670
1743
def self . encode ( channel , consumer_tag , nowait )
1671
1744
buffer = @packed_indexes . dup
1672
1745
buffer << consumer_tag . to_s . bytesize . chr
@@ -1719,7 +1792,7 @@ def self.has_content?
1719
1792
end
1720
1793
1721
1794
# @return
1722
- # ['ticket = 0', 'exchange = EMPTY_STRING', 'routing_key = EMPTY_STRING', 'mandatory = false', 'immediate = false', 'user_headers = nil', 'payload = ""', 'frame_size = nil']
1795
+ # [u 'ticket = 0', u 'exchange = EMPTY_STRING', u 'routing_key = EMPTY_STRING', u 'mandatory = false', u 'immediate = false', 'user_headers = nil', 'payload = ""', 'frame_size = nil']
1723
1796
def self . encode ( channel , payload , user_headers , exchange , routing_key , mandatory , immediate , frame_size )
1724
1797
ticket = 0
1725
1798
buffer = @packed_indexes . dup
@@ -1843,7 +1916,7 @@ def self.has_content?
1843
1916
end
1844
1917
1845
1918
# @return
1846
- # ['ticket = 0', 'queue = EMPTY_STRING', 'no_ack = false']
1919
+ # [u 'ticket = 0', u 'queue = EMPTY_STRING', u 'no_ack = false']
1847
1920
def self . encode ( channel , queue , no_ack )
1848
1921
ticket = 0
1849
1922
buffer = @packed_indexes . dup
@@ -1957,7 +2030,7 @@ def self.has_content?
1957
2030
end
1958
2031
1959
2032
# @return
1960
- # ['delivery_tag = false', 'multiple = false']
2033
+ # [u 'delivery_tag = false', u 'multiple = false']
1961
2034
def self . encode ( channel , delivery_tag , multiple )
1962
2035
buffer = @packed_indexes . dup
1963
2036
buffer << AMQ ::Pack . pack_uint64_big_endian ( delivery_tag )
@@ -1981,7 +2054,7 @@ def self.has_content?
1981
2054
end
1982
2055
1983
2056
# @return
1984
- # ['delivery_tag = nil', 'requeue = true']
2057
+ # [u 'delivery_tag = nil', u 'requeue = true']
1985
2058
def self . encode ( channel , delivery_tag , requeue )
1986
2059
buffer = @packed_indexes . dup
1987
2060
buffer << AMQ ::Pack . pack_uint64_big_endian ( delivery_tag )
@@ -2005,7 +2078,7 @@ def self.has_content?
2005
2078
end
2006
2079
2007
2080
# @return
2008
- # ['requeue = false']
2081
+ # [u 'requeue = false']
2009
2082
def self . encode ( channel , requeue )
2010
2083
buffer = @packed_indexes . dup
2011
2084
bit_buffer = 0
@@ -2028,7 +2101,7 @@ def self.has_content?
2028
2101
end
2029
2102
2030
2103
# @return
2031
- # ['requeue = false']
2104
+ # [u 'requeue = false']
2032
2105
def self . encode ( channel , requeue )
2033
2106
buffer = @packed_indexes . dup
2034
2107
bit_buffer = 0
@@ -2091,7 +2164,7 @@ def self.has_content?
2091
2164
end
2092
2165
2093
2166
# @return
2094
- # ['delivery_tag = false', 'multiple = false', 'requeue = true']
2167
+ # [u 'delivery_tag = false', u 'multiple = false', u 'requeue = true']
2095
2168
def self . encode ( channel , delivery_tag , multiple , requeue )
2096
2169
buffer = @packed_indexes . dup
2097
2170
buffer << AMQ ::Pack . pack_uint64_big_endian ( delivery_tag )
@@ -2271,7 +2344,7 @@ def self.has_content?
2271
2344
end
2272
2345
2273
2346
# @return
2274
- # ['nowait = false']
2347
+ # [u 'nowait = false']
2275
2348
def self . encode ( channel , nowait )
2276
2349
buffer = @packed_indexes . dup
2277
2350
bit_buffer = 0
0 commit comments