Class List Method List File List

# Class: VertxRabbitmq::RabbitMQClient

Inherits:
  Object
  - Object
  - VertxRabbitmq::RabbitMQClient
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb

## Class Method Summary (collapse)

- + (Object) create(vertx = nil, config = nil)

## Instance Method Summary (collapse)

- - (Object) basic_ack(deliveryTag = nil, multiple = nil)
- - (Object) basic_consume(queue = nil, address = nil, autoAck = nil)
- - (Object) basic_get(queue = nil, autoAck = nil)
- - (Object) basic_nack(deliveryTag = nil, multiple = nil, requeue = nil)
- - (Object) basic_publish(exchange = nil, routingKey = nil, message = nil)
- - (Object) basic_qos(prefetchCount = nil)
- - (Boolean) connected?
- - (Object) exchange_bind(destination = nil, source = nil, routingKey = nil)
- - (Object) exchange_declare(exchange = nil, type = nil, durable = nil, autoDelete = nil)
- - (Object) exchange_delete(exchange = nil)
- - (Object) exchange_unbind(destination = nil, source = nil, routingKey = nil)
- - (RabbitMQClient) initialize(j_del) constructor
  A new instance of RabbitMQClient.
- - (Object) j_del
- - (Object) message_count(queue = nil)
- - (Boolean) open_channel?
- - (Object) queue_bind(queue = nil, exchange = nil, routingKey = nil)
- - (Object) queue_declare(queue = nil, durable = nil, exclusive = nil, autoDelete = nil)
- - (Object) queue_declare_auto
- - (Object) queue_delete(queue = nil)
- - (Object) queue_delete_if(queue = nil, ifUnused = nil, ifEmpty = nil)
- - (Object) start
- - (Object) stop

## Constructor Details

### - (`RabbitMQClient`) initialize(j_del)

Returns a new instance of RabbitMQClient

    8
    9
    10
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 8

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(vertx = nil, config = nil)

Raises:

- (`ArgumentError`)

    19
    20
    21
    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 19

    def self.create(vertx=nil,config=nil)
      if vertx.class.method_defined?(:j_del) && config.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxRabbitmq::RabbitMQClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxCoreJson::JsonObject.java_class]).call(vertx.j_del,::Vertx::Util::Utils.to_json_object(config)),::VertxRabbitmq::RabbitMQClient)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx,config)"
    end

## Instance Method Details

### - (`Object`) basic_ack(deliveryTag = nil, multiple = nil)

Raises:

- (`ArgumentError`)

    31
    32
    33
    34
    35
    36
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 31

    def basic_ack(deliveryTag=nil,multiple=nil)
      if deliveryTag.class == Fixnum && (multiple.class == TrueClass || multiple.class == FalseClass) && block_given?
        return @j_del.java_method(:basicAck, [Java::long.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(deliveryTag,multiple,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_ack(deliveryTag,multiple)"
    end

### - (`Object`) basic_consume(queue = nil, address = nil, autoAck = nil)

Raises:

- (`ArgumentError`)

    66
    67
    68
    69
    70
    71
    72
    73
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 66

    def basic_consume(queue=nil,address=nil,autoAck=nil)
      if queue.class == String && address.class == String && block_given? && autoAck == nil
        return @j_del.java_method(:basicConsume, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,address,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      elsif queue.class == String && address.class == String && (autoAck.class == TrueClass || autoAck.class == FalseClass) && block_given?
        return @j_del.java_method(:basicConsume, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,address,autoAck,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_consume(queue,address,autoAck)"
    end

### - (`Object`) basic_get(queue = nil, autoAck = nil)

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 54

    def basic_get(queue=nil,autoAck=nil)
      if queue.class == String && (autoAck.class == TrueClass || autoAck.class == FalseClass) && block_given?
        return @j_del.java_method(:basicGet, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,autoAck,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_get(queue,autoAck)"
    end

### - (`Object`) basic_nack(deliveryTag = nil, multiple = nil, requeue = nil)

Raises:

- (`ArgumentError`)

    43
    44
    45
    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 43

    def basic_nack(deliveryTag=nil,multiple=nil,requeue=nil)
      if deliveryTag.class == Fixnum && (multiple.class == TrueClass || multiple.class == FalseClass) && (requeue.class == TrueClass || requeue.class == FalseClass) && block_given?
        return @j_del.java_method(:basicNack, [Java::long.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(deliveryTag,multiple,requeue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_nack(deliveryTag,multiple,requeue)"
    end

### - (`Object`) basic_publish(exchange = nil, routingKey = nil, message = nil)

Raises:

- (`ArgumentError`)

    81
    82
    83
    84
    85
    86
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 81

    def basic_publish(exchange=nil,routingKey=nil,message=nil)
      if exchange.class == String && routingKey.class == String && message.class == Hash && block_given?
        return @j_del.java_method(:basicPublish, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,routingKey,::Vertx::Util::Utils.to_json_object(message),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_publish(exchange,routingKey,message)"
    end

### - (`Object`) basic_qos(prefetchCount = nil)

Raises:

- (`ArgumentError`)

    92
    93
    94
    95
    96
    97
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 92

    def basic_qos(prefetchCount=nil)
      if prefetchCount.class == Fixnum && block_given?
        return @j_del.java_method(:basicQos, [Java::int.java_class,Java::IoVertxCore::Handler.java_class]).call(prefetchCount,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling basic_qos(prefetchCount)"
    end

### - (`Boolean`) connected?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    231
    232
    233
    234
    235
    236
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 231

    def connected?
      if !block_given?
        return @j_del.java_method(:isConnected, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling connected?()"
    end

### - (`Object`) exchange_bind(destination = nil, source = nil, routingKey = nil)

Raises:

- (`ArgumentError`)

    127
    128
    129
    130
    131
    132
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 127

    def exchange_bind(destination=nil,source=nil,routingKey=nil)
      if destination.class == String && source.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:exchangeBind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,source,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_bind(destination,source,routingKey)"
    end

### - (`Object`) exchange_declare(exchange = nil, type = nil, durable = nil, autoDelete = nil)

Raises:

- (`ArgumentError`)

    105
    106
    107
    108
    109
    110
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 105

    def exchange_declare(exchange=nil,type=nil,durable=nil,autoDelete=nil)
      if exchange.class == String && type.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && block_given?
        return @j_del.java_method(:exchangeDeclare, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,type,durable,autoDelete,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_declare(exchange,type,durable,autoDelete)"
    end

### - (`Object`) exchange_delete(exchange = nil)

Raises:

- (`ArgumentError`)

    115
    116
    117
    118
    119
    120
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 115

    def exchange_delete(exchange=nil)
      if exchange.class == String && block_given?
        return @j_del.java_method(:exchangeDelete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(exchange,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_delete(exchange)"
    end

### - (`Object`) exchange_unbind(destination = nil, source = nil, routingKey = nil)

Raises:

- (`ArgumentError`)

    139
    140
    141
    142
    143
    144
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 139

    def exchange_unbind(destination=nil,source=nil,routingKey=nil)
      if destination.class == String && source.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:exchangeUnbind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,source,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling exchange_unbind(destination,source,routingKey)"
    end

### - (`Object`) j_del

    13
    14
    15
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 13

    def j_del
      @j_del
    end

### - (`Object`) message_count(queue = nil)

Raises:

- (`ArgumentError`)

    205
    206
    207
    208
    209
    210
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 205

    def message_count(queue=nil)
      if queue.class == String && block_given?
        return @j_del.java_method(:messageCount, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling message_count(queue)"
    end

### - (`Boolean`) open_channel?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    239
    240
    241
    242
    243
    244
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 239

    def open_channel?
      if !block_given?
        return @j_del.java_method(:isOpenChannel, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling open_channel?()"
    end

### - (`Object`) queue_bind(queue = nil, exchange = nil, routingKey = nil)

Raises:

- (`ArgumentError`)

    195
    196
    197
    198
    199
    200
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 195

    def queue_bind(queue=nil,exchange=nil,routingKey=nil)
      if queue.class == String && exchange.class == String && routingKey.class == String && block_given?
        return @j_del.java_method(:queueBind, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,exchange,routingKey,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_bind(queue,exchange,routingKey)"
    end

### - (`Object`) queue_declare(queue = nil, durable = nil, exclusive = nil, autoDelete = nil)

Raises:

- (`ArgumentError`)

    161
    162
    163
    164
    165
    166
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 161

    def queue_declare(queue=nil,durable=nil,exclusive=nil,autoDelete=nil)
      if queue.class == String && (durable.class == TrueClass || durable.class == FalseClass) && (exclusive.class == TrueClass || exclusive.class == FalseClass) && (autoDelete.class == TrueClass || autoDelete.class == FalseClass) && block_given?
        return @j_del.java_method(:queueDeclare, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,durable,exclusive,autoDelete,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_declare(queue,durable,exclusive,autoDelete)"
    end

### - (`Object`) queue_declare_auto

Raises:

- (`ArgumentError`)

    148
    149
    150
    151
    152
    153
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 148

    def queue_declare_auto
      if block_given?
        return @j_del.java_method(:queueDeclareAuto, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_declare_auto()"
    end

### - (`Object`) queue_delete(queue = nil)

Raises:

- (`ArgumentError`)

    171
    172
    173
    174
    175
    176
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 171

    def queue_delete(queue=nil)
      if queue.class == String && block_given?
        return @j_del.java_method(:queueDelete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_delete(queue)"
    end

### - (`Object`) queue_delete_if(queue = nil, ifUnused = nil, ifEmpty = nil)

Raises:

- (`ArgumentError`)

    183
    184
    185
    186
    187
    188
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 183

    def queue_delete_if(queue=nil,ifUnused=nil,ifEmpty=nil)
      if queue.class == String && (ifUnused.class == TrueClass || ifUnused.class == FalseClass) && (ifEmpty.class == TrueClass || ifEmpty.class == FalseClass) && block_given?
        return @j_del.java_method(:queueDeleteIf, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(queue,ifUnused,ifEmpty,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result != nil ? JSON.parse(ar.result.encode) : nil : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling queue_delete_if(queue,ifUnused,ifEmpty)"
    end

### - (`Object`) start

Raises:

- (`ArgumentError`)

    214
    215
    216
    217
    218
    219
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 214

    def start
      if block_given?
        return @j_del.java_method(:start, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling start()"
    end

### - (`Object`) stop

Raises:

- (`ArgumentError`)

    223
    224
    225
    226
    227
    228
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-rabbitmq/rabbit_mq_client.rb', line 223

    def stop
      if block_given?
        return @j_del.java_method(:stop, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling stop()"
    end