Sha256: c3f8bb4aae87d8b450c7963d071e638839d4b5200ed0c98de2feeeb097e0708c

Contents?: true

Size: 1.3 KB

Versions: 3

Compression:

Stored size: 1.3 KB

Contents

module Isimud
  # @abstract Messaging queue service client
  class Client
    include Isimud::Logging

    def initialize(server = nil, options = nil)
    end

    def bind(queue_name, exchange_name, *keys, &method)
    end

    def channel
    end

    def close
    end

    def connect
    end

    def connected?
    end

    def create_queue(queue_name, exchange_name, options = {})
    end

    def delete_queue(queue_name)
    end

    def find_queue(queue_name, options = {})
    end

    # 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.
    # @yieldparam [Exception] e exception raised
    def on_exception(&block)
      exception_handlers << block
    end

    # Call each of the exception handlers declared by #on_exception.
    # @param [Exception] exception
    def run_exception_handlers(exception)
      exception_handlers.each{|handler| handler.call(exception)}
    end

    def publish(exchange, routing_key, payload)
    end

    def reconnect
    end

    def reset
    end

    def subscribe(queue, options = {}, &block)
    end

    private

    def exception_handlers
      @exception_handlers ||= Array.new
    end
  end
end

require 'isimud/bunny_client'
require 'isimud/test_client'

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
isimud-1.3.9 lib/isimud/client.rb
isimud-1.3.8 lib/isimud/client.rb
isimud-1.3.1 lib/isimud/client.rb