Class: Isimud::Client Abstract
Overview
This class is abstract.
Messaging queue service client
Direct Known Subclasses
Instance Method Summary (collapse)
- - (Object) bind(queue_name, exchange_name, *keys, &method)
- - (Object) channel
- - (Object) close
- - (Object) connect
- - (Boolean) connected?
- - (Object) create_queue(queue_name, exchange_name, options = {})
- - (Object) delete_queue(queue_name)
- - (Object) find_queue(queue_name, options = {})
-
- (Client) initialize(server = nil, options = nil)
constructor
A new instance of Client.
-
- (Object) on_exception {|e| ... }
Declare a proc to be run whenever an uncaught exception is raised within a message processing block.
- - (Object) publish(exchange, routing_key, payload)
- - (Object) reconnect
- - (Object) reset
-
- (Object) run_exception_handlers(exception)
Call each of the exception handlers declared by #on_exception.
- - (Object) subscribe(queue, options = {}, &block)
Methods included from Logging
Constructor Details
- (Client) initialize(server = nil, options = nil)
Returns a new instance of Client
6 7 |
# File 'lib/isimud/client.rb', line 6 def initialize(server = nil, = nil) end |
Instance Method Details
- (Object) bind(queue_name, exchange_name, *keys, &method)
9 10 |
# File 'lib/isimud/client.rb', line 9 def bind(queue_name, exchange_name, *keys, &method) end |
- (Object) channel
12 13 |
# File 'lib/isimud/client.rb', line 12 def channel end |
- (Object) close
15 16 |
# File 'lib/isimud/client.rb', line 15 def close end |
- (Object) connect
18 19 |
# File 'lib/isimud/client.rb', line 18 def connect end |
- (Boolean) connected?
21 22 |
# File 'lib/isimud/client.rb', line 21 def connected? end |
- (Object) create_queue(queue_name, exchange_name, options = {})
24 25 |
# File 'lib/isimud/client.rb', line 24 def create_queue(queue_name, exchange_name, = {}) end |
- (Object) delete_queue(queue_name)
27 28 |
# File 'lib/isimud/client.rb', line 27 def delete_queue(queue_name) end |
- (Object) find_queue(queue_name, options = {})
30 31 |
# File 'lib/isimud/client.rb', line 30 def find_queue(queue_name, = {}) end |
- (Object) on_exception {|e| ... }
Declare a proc to be run whenever an uncaught exception is raised within a message processing block. This is useful for logging or monitoring errors, for instance.
36 37 38 |
# File 'lib/isimud/client.rb', line 36 def on_exception(&block) exception_handlers << block end |
- (Object) publish(exchange, routing_key, payload)
46 47 |
# File 'lib/isimud/client.rb', line 46 def publish(exchange, routing_key, payload) end |
- (Object) reconnect
49 50 |
# File 'lib/isimud/client.rb', line 49 def reconnect end |
- (Object) reset
52 53 |
# File 'lib/isimud/client.rb', line 52 def reset end |
- (Object) run_exception_handlers(exception)
Call each of the exception handlers declared by #on_exception.
42 43 44 |
# File 'lib/isimud/client.rb', line 42 def run_exception_handlers(exception) exception_handlers.each{|handler| handler.call(exception)} end |
- (Object) subscribe(queue, options = {}, &block)
55 56 |
# File 'lib/isimud/client.rb', line 55 def subscribe(queue, = {}, &block) end |