amqp 0.7.5 → 0.8.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -4
- data/.travis.yml +3 -5
- data/.yardopts +6 -0
- data/CHANGELOG +26 -7
- data/Gemfile +15 -7
- data/README.textile +216 -0
- data/Rakefile +0 -6
- data/amqp.gemspec +14 -4
- data/bin/jenkins.sh +27 -0
- data/bin/set_test_suite_realms_up.sh +16 -2
- data/docs/VendorSpecificExtensions.textile +32 -0
- data/examples/extensions/rabbitmq/publisher_confirmations_with_transient_messages.rb +53 -0
- data/examples/hello_world.rb +29 -0
- data/examples/real-world/task-queue/README.textile +3 -0
- data/examples/real-world/task-queue/consumer.rb +27 -0
- data/examples/real-world/task-queue/producer.rb +22 -0
- data/examples/various/ack.rb +70 -0
- data/examples/various/automatic_binding_for_default_direct_exchange.rb +53 -0
- data/examples/various/basic_get.rb +65 -0
- data/examples/various/callbacks.rb +45 -0
- data/examples/various/clock.rb +74 -0
- data/examples/various/declare_a_queue_without_assignment.rb +46 -0
- data/examples/various/declare_an_exchange_without_assignment.rb +46 -0
- data/examples/various/hashtable.rb +60 -0
- data/examples/{logger.rb → various/logger.rb} +9 -7
- data/examples/{multiclock.rb → various/multiclock.rb} +15 -17
- data/examples/various/open_channel_without_assignment.rb +34 -0
- data/examples/various/pingpong.rb +53 -0
- data/examples/various/primes-simple.rb +29 -0
- data/examples/various/primes.rb +76 -0
- data/examples/various/pubsub.rb +43 -0
- data/examples/various/queue_status.rb +58 -0
- data/examples/various/stocks.rb +59 -0
- data/examples/various/weather_updates.rb +63 -0
- data/lib/amqp.rb +11 -2
- data/lib/amqp/basic_client.rb +23 -54
- data/lib/amqp/channel.rb +577 -805
- data/lib/amqp/client.rb +37 -275
- data/lib/amqp/connection.rb +165 -93
- data/lib/amqp/deprecated/fork.rb +15 -0
- data/lib/amqp/deprecated/logger.rb +99 -0
- data/lib/amqp/deprecated/mq.rb +20 -0
- data/lib/amqp/deprecated/rpc.rb +168 -0
- data/lib/amqp/exchange.rb +409 -281
- data/lib/amqp/extensions/rabbitmq.rb +1 -0
- data/lib/amqp/header.rb +41 -17
- data/lib/amqp/logger.rb +10 -84
- data/lib/amqp/queue.rb +457 -320
- data/lib/amqp/rpc.rb +11 -107
- data/lib/amqp/version.rb +1 -1
- data/lib/mq.rb +2 -1
- data/lib/mq/logger.rb +2 -0
- data/lib/mq/rpc.rb +2 -0
- data/spec/integration/authentication_spec.rb +36 -40
- data/spec/integration/automatic_binding_for_default_direct_exchange_spec.rb +3 -5
- data/spec/integration/basic_get_spec.rb +91 -0
- data/spec/integration/channel_close_spec.rb +5 -5
- data/spec/integration/exchange_declaration_spec.rb +6 -53
- data/spec/integration/extensions/basic_return_spec.rb +47 -0
- data/spec/integration/queue_declaration_spec.rb +14 -17
- data/spec/integration/queue_exclusivity_spec.rb +49 -48
- data/spec/integration/reply_queue_communication_spec.rb +6 -4
- data/spec/integration/store_and_forward_spec.rb +9 -36
- data/spec/integration/topic_subscription_spec.rb +1 -1
- data/spec/integration/workload_distribution_spec.rb +1 -0
- data/spec/spec_helper.rb +69 -43
- data/spec/unit/amqp/connection_spec.rb +27 -23
- data/tasks.rb +11 -0
- metadata +124 -95
- data/README.md +0 -156
- data/TODO +0 -30
- data/amqp.pre.gemspec +0 -6
- data/examples/ack.rb +0 -47
- data/examples/automatic_binding_for_default_direct_exchange.rb +0 -65
- data/examples/callbacks.rb +0 -40
- data/examples/clock.rb +0 -65
- data/examples/default_channel.rb +0 -19
- data/examples/hashtable.rb +0 -61
- data/examples/immediately_bind_a_server_named_queue.rb +0 -38
- data/examples/internal.rb +0 -51
- data/examples/issues/issue_75.rb +0 -21
- data/examples/issues/issue_94.rb +0 -23
- data/examples/pingpong.rb +0 -54
- data/examples/pop.rb +0 -45
- data/examples/primes-simple.rb +0 -21
- data/examples/primes.rb +0 -101
- data/examples/simple.rb +0 -81
- data/examples/stocks.rb +0 -67
- data/gemfiles/eventmachine-pre +0 -24
- data/lib/amqp/buffer.rb +0 -272
- data/lib/amqp/collection.rb +0 -60
- data/lib/amqp/frame.rb +0 -68
- data/lib/amqp/protocol.rb +0 -163
- data/lib/amqp/server.rb +0 -101
- data/lib/amqp/spec.rb +0 -832
- data/protocol/amqp-0.8.json +0 -617
- data/protocol/amqp-0.8.xml +0 -3908
- data/protocol/codegen.rb +0 -175
- data/protocol/doc.txt +0 -281
- data/research/api.rb +0 -52
- data/research/primes-forked.rb +0 -65
- data/research/primes-processes.rb +0 -137
- data/research/primes-threaded.rb +0 -51
- data/spec/integration/queue_status_spec.rb +0 -44
- data/spec/unit/amqp/buffer_spec.rb +0 -178
- data/spec/unit/amqp/client_spec.rb +0 -102
- data/spec/unit/amqp/collection_spec.rb +0 -144
- data/spec/unit/amqp/frame_spec.rb +0 -60
- data/spec/unit/amqp/protocol_spec.rb +0 -51
data/lib/amqp/collection.rb
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module AMQP
|
4
|
-
# AMQP::Collection is used to store named AMQ model entities (exchanges, queues)
|
5
|
-
class Collection < ::Array
|
6
|
-
class IncompatibleItemError < ArgumentError
|
7
|
-
def initialize(item)
|
8
|
-
super("Instance of #{item.class} doesn't respond to #name!")
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def [](name)
|
13
|
-
self.find do |object|
|
14
|
-
object.name == name
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# Collection#[]= doesn't really make any sense, as we can't
|
19
|
-
# redefine already existing Queues and Exchanges (we can declare
|
20
|
-
# them multiple times, but if the queue resp. exchange is already
|
21
|
-
# in the collection, it doesn't make sense to do so and we can't
|
22
|
-
# run declare twice in order to change options, because the AMQP
|
23
|
-
# broker closes the connection if we try to do so).
|
24
|
-
|
25
|
-
# Use Collection# << for adding items to the collection.
|
26
|
-
undef_method :[]=
|
27
|
-
|
28
|
-
def <<(item)
|
29
|
-
if (item.name rescue nil).nil? || !self[item.name]
|
30
|
-
self.add!(item)
|
31
|
-
end
|
32
|
-
|
33
|
-
# We can't just return the item, because in case the item isn't added
|
34
|
-
# to the collection, then it'd be different from self[item.name].
|
35
|
-
return self[item.name]
|
36
|
-
end
|
37
|
-
|
38
|
-
alias_method :__push__, :push
|
39
|
-
alias_method :push, :<<
|
40
|
-
|
41
|
-
def add!(item)
|
42
|
-
unless item.respond_to?(:name)
|
43
|
-
raise IncompatibleItemError.new(item)
|
44
|
-
end
|
45
|
-
|
46
|
-
__push__(item)
|
47
|
-
return item
|
48
|
-
end
|
49
|
-
|
50
|
-
def include?(name)
|
51
|
-
not self[name].nil?
|
52
|
-
end
|
53
|
-
|
54
|
-
def delete(name)
|
55
|
-
if self.include?(name)
|
56
|
-
self.delete_at(self.index(self[name]))
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
data/lib/amqp/frame.rb
DELETED
@@ -1,68 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "amqp/spec"
|
4
|
-
require "amqp/buffer"
|
5
|
-
require "amqp/protocol"
|
6
|
-
|
7
|
-
module AMQP
|
8
|
-
class Frame #:nodoc: all
|
9
|
-
def initialize(payload = nil, channel = 0)
|
10
|
-
@channel, @payload = channel, payload
|
11
|
-
end
|
12
|
-
attr_accessor :channel, :payload
|
13
|
-
|
14
|
-
def id
|
15
|
-
self.class::ID
|
16
|
-
end
|
17
|
-
|
18
|
-
def to_binary
|
19
|
-
buf = Buffer.new
|
20
|
-
buf.write :octet, id
|
21
|
-
buf.write :short, channel
|
22
|
-
buf.write :longstr, payload
|
23
|
-
buf.write :octet, FOOTER
|
24
|
-
buf.rewind
|
25
|
-
buf
|
26
|
-
end
|
27
|
-
|
28
|
-
def to_s
|
29
|
-
to_binary.to_s
|
30
|
-
end
|
31
|
-
|
32
|
-
def == frame
|
33
|
-
[ :id, :channel, :payload ].inject(true) do |eql, field|
|
34
|
-
eql and __send__(field) == frame.__send__(field)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
class Invalid < StandardError; end
|
39
|
-
|
40
|
-
class Method
|
41
|
-
def initialize(payload = nil, channel = 0)
|
42
|
-
super
|
43
|
-
unless @payload.is_a? Protocol::Class::Method or @payload.nil?
|
44
|
-
@payload = Protocol.parse(@payload)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
class Header
|
50
|
-
def initialize(payload = nil, channel = 0)
|
51
|
-
super
|
52
|
-
unless @payload.is_a? Protocol::Header or @payload.nil?
|
53
|
-
@payload = Protocol::Header.new(@payload)
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
class Body; end
|
59
|
-
|
60
|
-
def self.parse buf
|
61
|
-
buf = Buffer.new(buf) unless buf.is_a? Buffer
|
62
|
-
buf.extract do
|
63
|
-
id, channel, payload, footer = buf.read(:octet, :short, :longstr, :octet)
|
64
|
-
Frame.types[id].new(payload, channel) if footer == FOOTER
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
data/lib/amqp/protocol.rb
DELETED
@@ -1,163 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "amqp/spec"
|
4
|
-
require "amqp/buffer"
|
5
|
-
|
6
|
-
module AMQP
|
7
|
-
module Protocol
|
8
|
-
#:stopdoc:
|
9
|
-
class Class::Method
|
10
|
-
def initialize(*args)
|
11
|
-
opts = args.pop if args.last.is_a? Hash
|
12
|
-
opts ||= {}
|
13
|
-
|
14
|
-
@debug = 1 # XXX hack, p(obj) == '' if no instance vars are set
|
15
|
-
|
16
|
-
if args.size == 1 and args.first.is_a? Buffer
|
17
|
-
buf = args.shift
|
18
|
-
else
|
19
|
-
buf = nil
|
20
|
-
end
|
21
|
-
|
22
|
-
self.class.arguments.each do |type, name|
|
23
|
-
val = buf ? buf.read(type) :
|
24
|
-
args.shift || opts[name] || opts[name.to_s]
|
25
|
-
instance_variable_set("@#{name}", val)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def arguments
|
30
|
-
self.class.arguments.inject({}) do |hash, (type, name)|
|
31
|
-
hash.update name => instance_variable_get("@#{name}")
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def to_binary
|
36
|
-
buf = Buffer.new
|
37
|
-
buf.write :short, self.class.section.id
|
38
|
-
buf.write :short, self.class.id
|
39
|
-
|
40
|
-
bits = []
|
41
|
-
|
42
|
-
self.class.arguments.each do |type, name|
|
43
|
-
val = instance_variable_get("@#{name}")
|
44
|
-
if type == :bit
|
45
|
-
bits << (val || false)
|
46
|
-
else
|
47
|
-
unless bits.empty?
|
48
|
-
buf.write :bit, bits
|
49
|
-
bits = []
|
50
|
-
end
|
51
|
-
buf.write type, val
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
buf.write :bit, bits unless bits.empty?
|
56
|
-
buf.rewind
|
57
|
-
|
58
|
-
buf
|
59
|
-
end
|
60
|
-
|
61
|
-
def to_s
|
62
|
-
to_binary.to_s
|
63
|
-
end
|
64
|
-
|
65
|
-
def to_frame(channel = 0)
|
66
|
-
Frame::Method.new(self, channel)
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
#:startdoc:
|
71
|
-
#
|
72
|
-
# Contains a properties hash that holds some potentially interesting
|
73
|
-
# information.
|
74
|
-
# * :delivery_mode
|
75
|
-
# 1 equals transient.
|
76
|
-
# 2 equals persistent. Unconsumed persistent messages will survive
|
77
|
-
# a server restart when they are stored in a durable queue.
|
78
|
-
# * :redelivered
|
79
|
-
# True or False
|
80
|
-
# * :routing_key
|
81
|
-
# The routing string used for matching this message to this queue.
|
82
|
-
# * :priority
|
83
|
-
# An integer in the range of 0 to 9 inclusive.
|
84
|
-
# * :content_type
|
85
|
-
# Always "application/octet-stream" (byte stream)
|
86
|
-
# * :exchange
|
87
|
-
# The source exchange which published this message.
|
88
|
-
# * :message_count
|
89
|
-
# The number of unconsumed messages contained in the queue.
|
90
|
-
# * :delivery_tag
|
91
|
-
# A monotonically increasing integer. This number should not be trusted
|
92
|
-
# as a sequence number. There is no guarantee it won't get reset.
|
93
|
-
class Header
|
94
|
-
def initialize(*args)
|
95
|
-
opts = args.pop if args.last.is_a? Hash
|
96
|
-
opts ||= {}
|
97
|
-
|
98
|
-
first = args.shift
|
99
|
-
|
100
|
-
if first.is_a? ::Class and first.ancestors.include? Protocol::Class
|
101
|
-
@klass = first
|
102
|
-
@size = args.shift || 0
|
103
|
-
@weight = args.shift || 0
|
104
|
-
@properties = opts
|
105
|
-
|
106
|
-
elsif first.is_a? Buffer or first.is_a? String
|
107
|
-
buf = first
|
108
|
-
buf = Buffer.new(buf) unless buf.is_a? Buffer
|
109
|
-
|
110
|
-
@klass = Protocol.classes[buf.read(:short)]
|
111
|
-
@weight = buf.read(:short)
|
112
|
-
@size = buf.read(:longlong)
|
113
|
-
|
114
|
-
props = buf.read(:properties, *klass.properties.map { |type, _| type })
|
115
|
-
@properties = Hash[*klass.properties.map { |_, name| name }.zip(props).reject { |k, v| v.nil? }.flatten]
|
116
|
-
|
117
|
-
else
|
118
|
-
raise ArgumentError, 'Invalid argument'
|
119
|
-
end
|
120
|
-
|
121
|
-
end
|
122
|
-
attr_accessor :klass, :size, :weight, :properties
|
123
|
-
|
124
|
-
def to_binary
|
125
|
-
buf = Buffer.new
|
126
|
-
buf.write :short, klass.id
|
127
|
-
buf.write :short, weight # XXX rabbitmq only supports weight == 0
|
128
|
-
buf.write :longlong, size
|
129
|
-
buf.write :properties, (klass.properties.map do |type, name|
|
130
|
-
[ type, properties[name] || properties[name.to_s] ]
|
131
|
-
end)
|
132
|
-
buf.rewind
|
133
|
-
buf
|
134
|
-
end
|
135
|
-
|
136
|
-
def to_s
|
137
|
-
to_binary.to_s
|
138
|
-
end
|
139
|
-
|
140
|
-
def to_frame(channel = 0)
|
141
|
-
Frame::Header.new(self, channel)
|
142
|
-
end
|
143
|
-
|
144
|
-
def == header
|
145
|
-
[ :klass, :size, :weight, :properties ].inject(true) do |eql, field|
|
146
|
-
eql and __send__(field) == header.__send__(field)
|
147
|
-
end
|
148
|
-
end
|
149
|
-
|
150
|
-
def method_missing(meth, *args, &blk)
|
151
|
-
@properties.has_key?(meth) || @klass.properties.find { |_, name| name == meth } ? @properties[meth] :
|
152
|
-
super
|
153
|
-
end
|
154
|
-
end
|
155
|
-
|
156
|
-
def self.parse buf
|
157
|
-
buf = Buffer.new(buf) unless buf.is_a? Buffer
|
158
|
-
class_id, method_id = buf.read(:short, :short)
|
159
|
-
classes[class_id].methods[method_id].new(buf)
|
160
|
-
end
|
161
|
-
#:stopdoc:
|
162
|
-
end
|
163
|
-
end
|
data/lib/amqp/server.rb
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require "amqp/frame"
|
4
|
-
|
5
|
-
module AMQP
|
6
|
-
module Server
|
7
|
-
def post_init
|
8
|
-
@buf = ''
|
9
|
-
@channels = {}
|
10
|
-
@started = false
|
11
|
-
end
|
12
|
-
|
13
|
-
def receive_data(data)
|
14
|
-
@buf << data
|
15
|
-
|
16
|
-
unless @started
|
17
|
-
if @buf.size >= 8
|
18
|
-
if @buf.slice!(0, 8) == "AMQP\001\001\b\000"
|
19
|
-
send Protocol::Connection::Start.new(
|
20
|
-
8,
|
21
|
-
0,
|
22
|
-
{
|
23
|
-
:information => 'Licensed under the Ruby license. See http://github.com/ruby-amqp/amqp',
|
24
|
-
:copyright => 'Copyright (c) 2008-2009 Aman Gupta',
|
25
|
-
:platform => 'Ruby/EventMachine',
|
26
|
-
:version => '0.6.1',
|
27
|
-
:product => 'SquirrelMQ'
|
28
|
-
},
|
29
|
-
'PLAIN AMQPLAIN',
|
30
|
-
'en_US'
|
31
|
-
)
|
32
|
-
else
|
33
|
-
close_connection
|
34
|
-
return
|
35
|
-
end
|
36
|
-
@started = true
|
37
|
-
else
|
38
|
-
return
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
while frame = Frame.parse(@buf)
|
43
|
-
process_frame frame
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def process_frame(frame)
|
48
|
-
channel = frame.channel
|
49
|
-
|
50
|
-
case method = frame.payload
|
51
|
-
when Protocol::Connection::StartOk
|
52
|
-
@user = method.response[:LOGIN]
|
53
|
-
@pass = method.response[:PASSWORD]
|
54
|
-
send Protocol::Connection::Tune.new(0, 131072, 0)
|
55
|
-
|
56
|
-
when Protocol::Connection::TuneOk
|
57
|
-
# mnnk
|
58
|
-
|
59
|
-
when Protocol::Connection::Open
|
60
|
-
@vhost = method.virtual_host
|
61
|
-
send Protocol::Connection::OpenOk.new('localhost')
|
62
|
-
|
63
|
-
when Protocol::Channel::Open
|
64
|
-
@channels[channel] = []
|
65
|
-
send Protocol::Channel::OpenOk.new, :channel => channel
|
66
|
-
|
67
|
-
when Protocol::Access::Request
|
68
|
-
send Protocol::Access::RequestOk.new(101)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
def send(data, opts = {})
|
73
|
-
channel = opts[:channel] ||= 0
|
74
|
-
data = data.to_frame(channel) unless data.is_a? Frame
|
75
|
-
data.channel = channel
|
76
|
-
|
77
|
-
log 'send', data
|
78
|
-
send_data data.to_s
|
79
|
-
end
|
80
|
-
|
81
|
-
def self.start host = 'localhost', port = 5672
|
82
|
-
EM.start_server host, port, self
|
83
|
-
end
|
84
|
-
|
85
|
-
private
|
86
|
-
|
87
|
-
def log(*args)
|
88
|
-
require 'pp'
|
89
|
-
pp args
|
90
|
-
puts
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
|
95
|
-
if __FILE__ == $0
|
96
|
-
require 'rubygems'
|
97
|
-
require 'eventmachine'
|
98
|
-
EM.run {
|
99
|
-
AMQP::Server.start
|
100
|
-
}
|
101
|
-
end
|
data/lib/amqp/spec.rb
DELETED
@@ -1,832 +0,0 @@
|
|
1
|
-
|
2
|
-
#:stopdoc:
|
3
|
-
# this file was autogenerated on 2011-07-25 08:34:44 +0100
|
4
|
-
# using amqp-0.8.json (mtime: 2011-07-25 08:30:58 +0100)
|
5
|
-
#
|
6
|
-
# DO NOT EDIT! (edit protocol/codegen.rb instead, and run `rake codegen`)
|
7
|
-
|
8
|
-
module AMQP
|
9
|
-
HEADER = "AMQP".freeze
|
10
|
-
VERSION_MAJOR = 8
|
11
|
-
VERSION_MINOR = 0
|
12
|
-
PORT = 5672
|
13
|
-
|
14
|
-
class Frame
|
15
|
-
def self.types
|
16
|
-
@types ||= {}
|
17
|
-
end
|
18
|
-
|
19
|
-
def self.Frame id
|
20
|
-
(@_base_frames ||= {})[id] ||= Class.new(Frame) do
|
21
|
-
class_eval %[
|
22
|
-
def self.inherited klass
|
23
|
-
klass.const_set(:ID, #{id})
|
24
|
-
Frame.types[#{id}] = klass
|
25
|
-
end
|
26
|
-
]
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
class Method < Frame( 1 ); end
|
31
|
-
class Header < Frame( 2 ); end
|
32
|
-
class Body < Frame( 3 ); end
|
33
|
-
class OobMethod < Frame( 4 ); end
|
34
|
-
class OobHeader < Frame( 5 ); end
|
35
|
-
class OobBody < Frame( 6 ); end
|
36
|
-
class Trace < Frame( 7 ); end
|
37
|
-
class Heartbeat < Frame( 8 ); end
|
38
|
-
|
39
|
-
FOOTER = 206
|
40
|
-
end
|
41
|
-
|
42
|
-
RESPONSES = {
|
43
|
-
200 => :REPLY_SUCCESS,
|
44
|
-
310 => :NOT_DELIVERED,
|
45
|
-
311 => :CONTENT_TOO_LARGE,
|
46
|
-
312 => :NO_ROUTE,
|
47
|
-
313 => :NO_CONSUMERS,
|
48
|
-
403 => :ACCESS_REFUSED,
|
49
|
-
404 => :NOT_FOUND,
|
50
|
-
405 => :RESOURCE_LOCKED,
|
51
|
-
406 => :PRECONDITION_FAILED,
|
52
|
-
320 => :CONNECTION_FORCED,
|
53
|
-
402 => :INVALID_PATH,
|
54
|
-
}
|
55
|
-
|
56
|
-
FIELDS = [
|
57
|
-
:bit,
|
58
|
-
:long,
|
59
|
-
:longlong,
|
60
|
-
:longstr,
|
61
|
-
:octet,
|
62
|
-
:short,
|
63
|
-
:shortstr,
|
64
|
-
:table,
|
65
|
-
:timestamp,
|
66
|
-
]
|
67
|
-
|
68
|
-
module Protocol
|
69
|
-
class Class
|
70
|
-
class << self
|
71
|
-
FIELDS.each do |f|
|
72
|
-
class_eval %[
|
73
|
-
def #{f} name
|
74
|
-
properties << [ :#{f}, name ] unless properties.include?([:#{f}, name])
|
75
|
-
attr_accessor name
|
76
|
-
end
|
77
|
-
]
|
78
|
-
end
|
79
|
-
|
80
|
-
def properties() @properties ||= [] end
|
81
|
-
|
82
|
-
def id() self::ID end
|
83
|
-
def name() self::NAME.to_s end
|
84
|
-
end
|
85
|
-
|
86
|
-
class Method
|
87
|
-
class << self
|
88
|
-
FIELDS.each do |f|
|
89
|
-
class_eval %[
|
90
|
-
def #{f} name
|
91
|
-
arguments << [ :#{f}, name ] unless arguments.include?([:#{f}, name])
|
92
|
-
attr_accessor name
|
93
|
-
end
|
94
|
-
]
|
95
|
-
end
|
96
|
-
|
97
|
-
def arguments() @arguments ||= [] end
|
98
|
-
|
99
|
-
def section() Protocol.const_get(self.to_s[/Protocol::(.+?)::/, 1]) end
|
100
|
-
def id() self::ID end
|
101
|
-
def name() self::NAME.to_s end
|
102
|
-
end
|
103
|
-
|
104
|
-
def == b
|
105
|
-
self.class.arguments.inject(true) do |eql, (type, name)|
|
106
|
-
eql and __send__("#{name}") == b.__send__("#{name}")
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
|
111
|
-
def self.methods() @methods ||= {} end
|
112
|
-
|
113
|
-
def self.Method(id, name)
|
114
|
-
@_base_methods ||= {}
|
115
|
-
@_base_methods[id] ||= ::Class.new(Method) do
|
116
|
-
class_eval %[
|
117
|
-
def self.inherited klass
|
118
|
-
klass.const_set(:ID, #{id})
|
119
|
-
klass.const_set(:NAME, :#{name.to_s})
|
120
|
-
klass.section.methods[#{id}] = klass
|
121
|
-
klass.section.methods[klass::NAME] = klass
|
122
|
-
end
|
123
|
-
]
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
def self.classes() @classes ||= {} end
|
129
|
-
|
130
|
-
def self.Class(id, name)
|
131
|
-
@_base_classes ||= {}
|
132
|
-
@_base_classes[id] ||= ::Class.new(Class) do
|
133
|
-
class_eval %[
|
134
|
-
def self.inherited klass
|
135
|
-
klass.const_set(:ID, #{id})
|
136
|
-
klass.const_set(:NAME, :#{name.to_s})
|
137
|
-
Protocol.classes[#{id}] = klass
|
138
|
-
Protocol.classes[klass::NAME] = klass
|
139
|
-
end
|
140
|
-
]
|
141
|
-
end
|
142
|
-
end
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
module AMQP
|
147
|
-
module Protocol
|
148
|
-
class Connection < Class( 10, :connection ); end
|
149
|
-
class Channel < Class( 20, :channel ); end
|
150
|
-
class Access < Class( 30, :access ); end
|
151
|
-
class Exchange < Class( 40, :exchange ); end
|
152
|
-
class Queue < Class( 50, :queue ); end
|
153
|
-
class Basic < Class( 60, :basic ); end
|
154
|
-
class File < Class( 70, :file ); end
|
155
|
-
class Stream < Class( 80, :stream ); end
|
156
|
-
class Tx < Class( 90, :tx ); end
|
157
|
-
class Dtx < Class( 100, :dtx ); end
|
158
|
-
class Tunnel < Class( 110, :tunnel ); end
|
159
|
-
class Test < Class( 120, :test ); end
|
160
|
-
|
161
|
-
class Connection
|
162
|
-
|
163
|
-
class Start < Method( 10, :start ); end
|
164
|
-
class StartOk < Method( 11, :start_ok ); end
|
165
|
-
class Secure < Method( 20, :secure ); end
|
166
|
-
class SecureOk < Method( 21, :secure_ok ); end
|
167
|
-
class Tune < Method( 30, :tune ); end
|
168
|
-
class TuneOk < Method( 31, :tune_ok ); end
|
169
|
-
class Open < Method( 40, :open ); end
|
170
|
-
class OpenOk < Method( 41, :open_ok ); end
|
171
|
-
class Redirect < Method( 50, :redirect ); end
|
172
|
-
class Close < Method( 60, :close ); end
|
173
|
-
class CloseOk < Method( 61, :close_ok ); end
|
174
|
-
|
175
|
-
class Start
|
176
|
-
octet :version_major
|
177
|
-
octet :version_minor
|
178
|
-
table :server_properties
|
179
|
-
longstr :mechanisms
|
180
|
-
longstr :locales
|
181
|
-
end
|
182
|
-
|
183
|
-
class StartOk
|
184
|
-
table :client_properties
|
185
|
-
shortstr :mechanism
|
186
|
-
longstr :response
|
187
|
-
shortstr :locale
|
188
|
-
end
|
189
|
-
|
190
|
-
class Secure
|
191
|
-
longstr :challenge
|
192
|
-
end
|
193
|
-
|
194
|
-
class SecureOk
|
195
|
-
longstr :response
|
196
|
-
end
|
197
|
-
|
198
|
-
class Tune
|
199
|
-
short :channel_max
|
200
|
-
long :frame_max
|
201
|
-
short :heartbeat
|
202
|
-
end
|
203
|
-
|
204
|
-
class TuneOk
|
205
|
-
short :channel_max
|
206
|
-
long :frame_max
|
207
|
-
short :heartbeat
|
208
|
-
end
|
209
|
-
|
210
|
-
class Open
|
211
|
-
shortstr :virtual_host
|
212
|
-
shortstr :capabilities
|
213
|
-
bit :insist
|
214
|
-
end
|
215
|
-
|
216
|
-
class OpenOk
|
217
|
-
shortstr :known_hosts
|
218
|
-
end
|
219
|
-
|
220
|
-
class Redirect
|
221
|
-
shortstr :host
|
222
|
-
shortstr :known_hosts
|
223
|
-
end
|
224
|
-
|
225
|
-
class Close
|
226
|
-
short :reply_code
|
227
|
-
shortstr :reply_text
|
228
|
-
short :class_id
|
229
|
-
short :method_id
|
230
|
-
end
|
231
|
-
|
232
|
-
class CloseOk
|
233
|
-
end
|
234
|
-
|
235
|
-
end
|
236
|
-
|
237
|
-
class Channel
|
238
|
-
|
239
|
-
class Open < Method( 10, :open ); end
|
240
|
-
class OpenOk < Method( 11, :open_ok ); end
|
241
|
-
class Flow < Method( 20, :flow ); end
|
242
|
-
class FlowOk < Method( 21, :flow_ok ); end
|
243
|
-
class Alert < Method( 30, :alert ); end
|
244
|
-
class Close < Method( 40, :close ); end
|
245
|
-
class CloseOk < Method( 41, :close_ok ); end
|
246
|
-
|
247
|
-
class Open
|
248
|
-
shortstr :out_of_band
|
249
|
-
end
|
250
|
-
|
251
|
-
class OpenOk
|
252
|
-
end
|
253
|
-
|
254
|
-
class Flow
|
255
|
-
bit :active
|
256
|
-
end
|
257
|
-
|
258
|
-
class FlowOk
|
259
|
-
bit :active
|
260
|
-
end
|
261
|
-
|
262
|
-
class Alert
|
263
|
-
short :reply_code
|
264
|
-
shortstr :reply_text
|
265
|
-
table :details
|
266
|
-
end
|
267
|
-
|
268
|
-
class Close
|
269
|
-
short :reply_code
|
270
|
-
shortstr :reply_text
|
271
|
-
short :class_id
|
272
|
-
short :method_id
|
273
|
-
end
|
274
|
-
|
275
|
-
class CloseOk
|
276
|
-
end
|
277
|
-
|
278
|
-
end
|
279
|
-
|
280
|
-
class Access
|
281
|
-
|
282
|
-
class Request < Method( 10, :request ); end
|
283
|
-
class RequestOk < Method( 11, :request_ok ); end
|
284
|
-
|
285
|
-
class Request
|
286
|
-
shortstr :realm
|
287
|
-
bit :exclusive
|
288
|
-
bit :passive
|
289
|
-
bit :active
|
290
|
-
bit :write
|
291
|
-
bit :read
|
292
|
-
end
|
293
|
-
|
294
|
-
class RequestOk
|
295
|
-
short :ticket
|
296
|
-
end
|
297
|
-
|
298
|
-
end
|
299
|
-
|
300
|
-
class Exchange
|
301
|
-
|
302
|
-
class Declare < Method( 10, :declare ); end
|
303
|
-
class DeclareOk < Method( 11, :declare_ok ); end
|
304
|
-
class Delete < Method( 20, :delete ); end
|
305
|
-
class DeleteOk < Method( 21, :delete_ok ); end
|
306
|
-
|
307
|
-
class Declare
|
308
|
-
short :ticket
|
309
|
-
shortstr :exchange
|
310
|
-
shortstr :type
|
311
|
-
bit :passive
|
312
|
-
bit :durable
|
313
|
-
bit :auto_delete
|
314
|
-
bit :internal
|
315
|
-
bit :nowait
|
316
|
-
table :arguments
|
317
|
-
end
|
318
|
-
|
319
|
-
class DeclareOk
|
320
|
-
end
|
321
|
-
|
322
|
-
class Delete
|
323
|
-
short :ticket
|
324
|
-
shortstr :exchange
|
325
|
-
bit :if_unused
|
326
|
-
bit :nowait
|
327
|
-
end
|
328
|
-
|
329
|
-
class DeleteOk
|
330
|
-
end
|
331
|
-
|
332
|
-
end
|
333
|
-
|
334
|
-
class Queue
|
335
|
-
|
336
|
-
class Declare < Method( 10, :declare ); end
|
337
|
-
class DeclareOk < Method( 11, :declare_ok ); end
|
338
|
-
class Bind < Method( 20, :bind ); end
|
339
|
-
class BindOk < Method( 21, :bind_ok ); end
|
340
|
-
class Purge < Method( 30, :purge ); end
|
341
|
-
class PurgeOk < Method( 31, :purge_ok ); end
|
342
|
-
class Delete < Method( 40, :delete ); end
|
343
|
-
class DeleteOk < Method( 41, :delete_ok ); end
|
344
|
-
class Unbind < Method( 50, :unbind ); end
|
345
|
-
class UnbindOk < Method( 51, :unbind_ok ); end
|
346
|
-
|
347
|
-
class Declare
|
348
|
-
short :ticket
|
349
|
-
shortstr :queue
|
350
|
-
bit :passive
|
351
|
-
bit :durable
|
352
|
-
bit :exclusive
|
353
|
-
bit :auto_delete
|
354
|
-
bit :nowait
|
355
|
-
table :arguments
|
356
|
-
end
|
357
|
-
|
358
|
-
class DeclareOk
|
359
|
-
shortstr :queue
|
360
|
-
long :message_count
|
361
|
-
long :consumer_count
|
362
|
-
end
|
363
|
-
|
364
|
-
class Bind
|
365
|
-
short :ticket
|
366
|
-
shortstr :queue
|
367
|
-
shortstr :exchange
|
368
|
-
shortstr :routing_key
|
369
|
-
bit :nowait
|
370
|
-
table :arguments
|
371
|
-
end
|
372
|
-
|
373
|
-
class BindOk
|
374
|
-
end
|
375
|
-
|
376
|
-
class Purge
|
377
|
-
short :ticket
|
378
|
-
shortstr :queue
|
379
|
-
bit :nowait
|
380
|
-
end
|
381
|
-
|
382
|
-
class PurgeOk
|
383
|
-
long :message_count
|
384
|
-
end
|
385
|
-
|
386
|
-
class Delete
|
387
|
-
short :ticket
|
388
|
-
shortstr :queue
|
389
|
-
bit :if_unused
|
390
|
-
bit :if_empty
|
391
|
-
bit :nowait
|
392
|
-
end
|
393
|
-
|
394
|
-
class DeleteOk
|
395
|
-
long :message_count
|
396
|
-
end
|
397
|
-
|
398
|
-
class Unbind
|
399
|
-
short :ticket
|
400
|
-
shortstr :queue
|
401
|
-
shortstr :exchange
|
402
|
-
shortstr :routing_key
|
403
|
-
table :arguments
|
404
|
-
end
|
405
|
-
|
406
|
-
class UnbindOk
|
407
|
-
end
|
408
|
-
|
409
|
-
end
|
410
|
-
|
411
|
-
class Basic
|
412
|
-
shortstr :content_type
|
413
|
-
shortstr :content_encoding
|
414
|
-
table :headers
|
415
|
-
octet :delivery_mode
|
416
|
-
octet :priority
|
417
|
-
shortstr :correlation_id
|
418
|
-
shortstr :reply_to
|
419
|
-
shortstr :expiration
|
420
|
-
shortstr :message_id
|
421
|
-
timestamp :timestamp
|
422
|
-
shortstr :type
|
423
|
-
shortstr :user_id
|
424
|
-
shortstr :app_id
|
425
|
-
shortstr :cluster_id
|
426
|
-
|
427
|
-
class Qos < Method( 10, :qos ); end
|
428
|
-
class QosOk < Method( 11, :qos_ok ); end
|
429
|
-
class Consume < Method( 20, :consume ); end
|
430
|
-
class ConsumeOk < Method( 21, :consume_ok ); end
|
431
|
-
class Cancel < Method( 30, :cancel ); end
|
432
|
-
class CancelOk < Method( 31, :cancel_ok ); end
|
433
|
-
class Publish < Method( 40, :publish ); end
|
434
|
-
class Return < Method( 50, :return ); end
|
435
|
-
class Deliver < Method( 60, :deliver ); end
|
436
|
-
class Get < Method( 70, :get ); end
|
437
|
-
class GetOk < Method( 71, :get_ok ); end
|
438
|
-
class GetEmpty < Method( 72, :get_empty ); end
|
439
|
-
class Ack < Method( 80, :ack ); end
|
440
|
-
class Reject < Method( 90, :reject ); end
|
441
|
-
class Recover < Method( 100, :recover ); end
|
442
|
-
|
443
|
-
class Qos
|
444
|
-
long :prefetch_size
|
445
|
-
short :prefetch_count
|
446
|
-
bit :global
|
447
|
-
end
|
448
|
-
|
449
|
-
class QosOk
|
450
|
-
end
|
451
|
-
|
452
|
-
class Consume
|
453
|
-
short :ticket
|
454
|
-
shortstr :queue
|
455
|
-
shortstr :consumer_tag
|
456
|
-
bit :no_local
|
457
|
-
bit :no_ack
|
458
|
-
bit :exclusive
|
459
|
-
bit :nowait
|
460
|
-
end
|
461
|
-
|
462
|
-
class ConsumeOk
|
463
|
-
shortstr :consumer_tag
|
464
|
-
end
|
465
|
-
|
466
|
-
class Cancel
|
467
|
-
shortstr :consumer_tag
|
468
|
-
bit :nowait
|
469
|
-
end
|
470
|
-
|
471
|
-
class CancelOk
|
472
|
-
shortstr :consumer_tag
|
473
|
-
end
|
474
|
-
|
475
|
-
class Publish
|
476
|
-
short :ticket
|
477
|
-
shortstr :exchange
|
478
|
-
shortstr :routing_key
|
479
|
-
bit :mandatory
|
480
|
-
bit :immediate
|
481
|
-
end
|
482
|
-
|
483
|
-
class Return
|
484
|
-
short :reply_code
|
485
|
-
shortstr :reply_text
|
486
|
-
shortstr :exchange
|
487
|
-
shortstr :routing_key
|
488
|
-
end
|
489
|
-
|
490
|
-
class Deliver
|
491
|
-
shortstr :consumer_tag
|
492
|
-
longlong :delivery_tag
|
493
|
-
bit :redelivered
|
494
|
-
shortstr :exchange
|
495
|
-
shortstr :routing_key
|
496
|
-
end
|
497
|
-
|
498
|
-
class Get
|
499
|
-
short :ticket
|
500
|
-
shortstr :queue
|
501
|
-
bit :no_ack
|
502
|
-
end
|
503
|
-
|
504
|
-
class GetOk
|
505
|
-
longlong :delivery_tag
|
506
|
-
bit :redelivered
|
507
|
-
shortstr :exchange
|
508
|
-
shortstr :routing_key
|
509
|
-
long :message_count
|
510
|
-
end
|
511
|
-
|
512
|
-
class GetEmpty
|
513
|
-
shortstr :cluster_id
|
514
|
-
end
|
515
|
-
|
516
|
-
class Ack
|
517
|
-
longlong :delivery_tag
|
518
|
-
bit :multiple
|
519
|
-
end
|
520
|
-
|
521
|
-
class Reject
|
522
|
-
longlong :delivery_tag
|
523
|
-
bit :requeue
|
524
|
-
end
|
525
|
-
|
526
|
-
class Recover
|
527
|
-
bit :requeue
|
528
|
-
end
|
529
|
-
|
530
|
-
end
|
531
|
-
|
532
|
-
class File
|
533
|
-
shortstr :content_type
|
534
|
-
shortstr :content_encoding
|
535
|
-
table :headers
|
536
|
-
octet :priority
|
537
|
-
shortstr :reply_to
|
538
|
-
shortstr :message_id
|
539
|
-
shortstr :filename
|
540
|
-
timestamp :timestamp
|
541
|
-
shortstr :cluster_id
|
542
|
-
|
543
|
-
class Qos < Method( 10, :qos ); end
|
544
|
-
class QosOk < Method( 11, :qos_ok ); end
|
545
|
-
class Consume < Method( 20, :consume ); end
|
546
|
-
class ConsumeOk < Method( 21, :consume_ok ); end
|
547
|
-
class Cancel < Method( 30, :cancel ); end
|
548
|
-
class CancelOk < Method( 31, :cancel_ok ); end
|
549
|
-
class Open < Method( 40, :open ); end
|
550
|
-
class OpenOk < Method( 41, :open_ok ); end
|
551
|
-
class Stage < Method( 50, :stage ); end
|
552
|
-
class Publish < Method( 60, :publish ); end
|
553
|
-
class Return < Method( 70, :return ); end
|
554
|
-
class Deliver < Method( 80, :deliver ); end
|
555
|
-
class Ack < Method( 90, :ack ); end
|
556
|
-
class Reject < Method( 100, :reject ); end
|
557
|
-
|
558
|
-
class Qos
|
559
|
-
long :prefetch_size
|
560
|
-
short :prefetch_count
|
561
|
-
bit :global
|
562
|
-
end
|
563
|
-
|
564
|
-
class QosOk
|
565
|
-
end
|
566
|
-
|
567
|
-
class Consume
|
568
|
-
short :ticket
|
569
|
-
shortstr :queue
|
570
|
-
shortstr :consumer_tag
|
571
|
-
bit :no_local
|
572
|
-
bit :no_ack
|
573
|
-
bit :exclusive
|
574
|
-
bit :nowait
|
575
|
-
end
|
576
|
-
|
577
|
-
class ConsumeOk
|
578
|
-
shortstr :consumer_tag
|
579
|
-
end
|
580
|
-
|
581
|
-
class Cancel
|
582
|
-
shortstr :consumer_tag
|
583
|
-
bit :nowait
|
584
|
-
end
|
585
|
-
|
586
|
-
class CancelOk
|
587
|
-
shortstr :consumer_tag
|
588
|
-
end
|
589
|
-
|
590
|
-
class Open
|
591
|
-
shortstr :identifier
|
592
|
-
longlong :content_size
|
593
|
-
end
|
594
|
-
|
595
|
-
class OpenOk
|
596
|
-
longlong :staged_size
|
597
|
-
end
|
598
|
-
|
599
|
-
class Stage
|
600
|
-
end
|
601
|
-
|
602
|
-
class Publish
|
603
|
-
short :ticket
|
604
|
-
shortstr :exchange
|
605
|
-
shortstr :routing_key
|
606
|
-
bit :mandatory
|
607
|
-
bit :immediate
|
608
|
-
shortstr :identifier
|
609
|
-
end
|
610
|
-
|
611
|
-
class Return
|
612
|
-
short :reply_code
|
613
|
-
shortstr :reply_text
|
614
|
-
shortstr :exchange
|
615
|
-
shortstr :routing_key
|
616
|
-
end
|
617
|
-
|
618
|
-
class Deliver
|
619
|
-
shortstr :consumer_tag
|
620
|
-
longlong :delivery_tag
|
621
|
-
bit :redelivered
|
622
|
-
shortstr :exchange
|
623
|
-
shortstr :routing_key
|
624
|
-
shortstr :identifier
|
625
|
-
end
|
626
|
-
|
627
|
-
class Ack
|
628
|
-
longlong :delivery_tag
|
629
|
-
bit :multiple
|
630
|
-
end
|
631
|
-
|
632
|
-
class Reject
|
633
|
-
longlong :delivery_tag
|
634
|
-
bit :requeue
|
635
|
-
end
|
636
|
-
|
637
|
-
end
|
638
|
-
|
639
|
-
class Stream
|
640
|
-
shortstr :content_type
|
641
|
-
shortstr :content_encoding
|
642
|
-
table :headers
|
643
|
-
octet :priority
|
644
|
-
timestamp :timestamp
|
645
|
-
|
646
|
-
class Qos < Method( 10, :qos ); end
|
647
|
-
class QosOk < Method( 11, :qos_ok ); end
|
648
|
-
class Consume < Method( 20, :consume ); end
|
649
|
-
class ConsumeOk < Method( 21, :consume_ok ); end
|
650
|
-
class Cancel < Method( 30, :cancel ); end
|
651
|
-
class CancelOk < Method( 31, :cancel_ok ); end
|
652
|
-
class Publish < Method( 40, :publish ); end
|
653
|
-
class Return < Method( 50, :return ); end
|
654
|
-
class Deliver < Method( 60, :deliver ); end
|
655
|
-
|
656
|
-
class Qos
|
657
|
-
long :prefetch_size
|
658
|
-
short :prefetch_count
|
659
|
-
long :consume_rate
|
660
|
-
bit :global
|
661
|
-
end
|
662
|
-
|
663
|
-
class QosOk
|
664
|
-
end
|
665
|
-
|
666
|
-
class Consume
|
667
|
-
short :ticket
|
668
|
-
shortstr :queue
|
669
|
-
shortstr :consumer_tag
|
670
|
-
bit :no_local
|
671
|
-
bit :exclusive
|
672
|
-
bit :nowait
|
673
|
-
end
|
674
|
-
|
675
|
-
class ConsumeOk
|
676
|
-
shortstr :consumer_tag
|
677
|
-
end
|
678
|
-
|
679
|
-
class Cancel
|
680
|
-
shortstr :consumer_tag
|
681
|
-
bit :nowait
|
682
|
-
end
|
683
|
-
|
684
|
-
class CancelOk
|
685
|
-
shortstr :consumer_tag
|
686
|
-
end
|
687
|
-
|
688
|
-
class Publish
|
689
|
-
short :ticket
|
690
|
-
shortstr :exchange
|
691
|
-
shortstr :routing_key
|
692
|
-
bit :mandatory
|
693
|
-
bit :immediate
|
694
|
-
end
|
695
|
-
|
696
|
-
class Return
|
697
|
-
short :reply_code
|
698
|
-
shortstr :reply_text
|
699
|
-
shortstr :exchange
|
700
|
-
shortstr :routing_key
|
701
|
-
end
|
702
|
-
|
703
|
-
class Deliver
|
704
|
-
shortstr :consumer_tag
|
705
|
-
longlong :delivery_tag
|
706
|
-
shortstr :exchange
|
707
|
-
shortstr :queue
|
708
|
-
end
|
709
|
-
|
710
|
-
end
|
711
|
-
|
712
|
-
class Tx
|
713
|
-
|
714
|
-
class Select < Method( 10, :select ); end
|
715
|
-
class SelectOk < Method( 11, :select_ok ); end
|
716
|
-
class Commit < Method( 20, :commit ); end
|
717
|
-
class CommitOk < Method( 21, :commit_ok ); end
|
718
|
-
class Rollback < Method( 30, :rollback ); end
|
719
|
-
class RollbackOk < Method( 31, :rollback_ok ); end
|
720
|
-
|
721
|
-
class Select
|
722
|
-
end
|
723
|
-
|
724
|
-
class SelectOk
|
725
|
-
end
|
726
|
-
|
727
|
-
class Commit
|
728
|
-
end
|
729
|
-
|
730
|
-
class CommitOk
|
731
|
-
end
|
732
|
-
|
733
|
-
class Rollback
|
734
|
-
end
|
735
|
-
|
736
|
-
class RollbackOk
|
737
|
-
end
|
738
|
-
|
739
|
-
end
|
740
|
-
|
741
|
-
class Dtx
|
742
|
-
|
743
|
-
class Select < Method( 10, :select ); end
|
744
|
-
class SelectOk < Method( 11, :select_ok ); end
|
745
|
-
class Start < Method( 20, :start ); end
|
746
|
-
class StartOk < Method( 21, :start_ok ); end
|
747
|
-
|
748
|
-
class Select
|
749
|
-
end
|
750
|
-
|
751
|
-
class SelectOk
|
752
|
-
end
|
753
|
-
|
754
|
-
class Start
|
755
|
-
shortstr :dtx_identifier
|
756
|
-
end
|
757
|
-
|
758
|
-
class StartOk
|
759
|
-
end
|
760
|
-
|
761
|
-
end
|
762
|
-
|
763
|
-
class Tunnel
|
764
|
-
table :headers
|
765
|
-
shortstr :proxy_name
|
766
|
-
shortstr :data_name
|
767
|
-
octet :durable
|
768
|
-
octet :broadcast
|
769
|
-
|
770
|
-
class Request < Method( 10, :request ); end
|
771
|
-
|
772
|
-
class Request
|
773
|
-
table :meta_data
|
774
|
-
end
|
775
|
-
|
776
|
-
end
|
777
|
-
|
778
|
-
class Test
|
779
|
-
|
780
|
-
class Integer < Method( 10, :integer ); end
|
781
|
-
class IntegerOk < Method( 11, :integer_ok ); end
|
782
|
-
class String < Method( 20, :string ); end
|
783
|
-
class StringOk < Method( 21, :string_ok ); end
|
784
|
-
class Table < Method( 30, :table ); end
|
785
|
-
class TableOk < Method( 31, :table_ok ); end
|
786
|
-
class Content < Method( 40, :content ); end
|
787
|
-
class ContentOk < Method( 41, :content_ok ); end
|
788
|
-
|
789
|
-
class Integer
|
790
|
-
octet :integer_1
|
791
|
-
short :integer_2
|
792
|
-
long :integer_3
|
793
|
-
longlong :integer_4
|
794
|
-
octet :operation
|
795
|
-
end
|
796
|
-
|
797
|
-
class IntegerOk
|
798
|
-
longlong :result
|
799
|
-
end
|
800
|
-
|
801
|
-
class String
|
802
|
-
shortstr :string_1
|
803
|
-
longstr :string_2
|
804
|
-
octet :operation
|
805
|
-
end
|
806
|
-
|
807
|
-
class StringOk
|
808
|
-
longstr :result
|
809
|
-
end
|
810
|
-
|
811
|
-
class Table
|
812
|
-
table :table
|
813
|
-
octet :integer_op
|
814
|
-
octet :string_op
|
815
|
-
end
|
816
|
-
|
817
|
-
class TableOk
|
818
|
-
longlong :integer_result
|
819
|
-
longstr :string_result
|
820
|
-
end
|
821
|
-
|
822
|
-
class Content
|
823
|
-
end
|
824
|
-
|
825
|
-
class ContentOk
|
826
|
-
long :content_checksum
|
827
|
-
end
|
828
|
-
|
829
|
-
end
|
830
|
-
|
831
|
-
end
|
832
|
-
end
|