Class List Method List File List

# Class: VertxStomp::StompClientConnection

Inherits:
  Object
  - Object
  - VertxStomp::StompClientConnection
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb

## Instance Method Summary (collapse)

- - (Object) abort(id = nil, headers = nil)
- - (Object) ack(id = nil, txId = nil)
- - (Object) begin_tx(id = nil, headers = nil)
- - (Object) close
- - (Object) close_handler
- - (Object) commit(id = nil, headers = nil)
- - (Object) connection_dropped_handler
- - (Object) disconnect(frame = nil)
- - (Object) error_handler
- - (StompClientConnection) initialize(j_del) constructor
  A new instance of StompClientConnection.
- - (Object) j_del
- - (Object) nack(id = nil, txId = nil)
- - (Object) ping_handler
- - (Object) received_frame_handler
- - (Object) send(param_1 = nil, param_2 = nil, param_3 = nil)
- - (Object) server
- - (Object) session
- - (Object) subscribe(param_1 = nil, param_2 = nil, param_3 = nil)
- - (Object) unsubscribe(destination = nil, headers = nil)
- - (Object) version
- - (Object) writing_frame_handler

## Constructor Details

### - (`StompClientConnection`) initialize(j_del)

Returns a new instance of StompClientConnection

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) abort(id = nil, headers = nil)

Raises:

- (`ArgumentError`)

    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 247

    def abort(id=nil,headers=nil)
      if id.class == String && !block_given? && headers == nil
        @j_del.java_method(:abort, [Java::java.lang.String.java_class]).call(id)
        return self
      elsif id.class == String && block_given? && headers == nil
        @j_del.java_method(:abort, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif id.class == String && headers.class == Hash && !block_given?
        @j_del.java_method(:abort, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }])
        return self
      elsif id.class == String && headers.class == Hash && block_given?
        @j_del.java_method(:abort, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }],(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling abort(id,headers)"
    end

### - (`Object`) ack(id = nil, txId = nil)

Raises:

- (`ArgumentError`)

    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 290

    def ack(id=nil,txId=nil)
      if id.class == String && !block_given? && txId == nil
        @j_del.java_method(:ack, [Java::java.lang.String.java_class]).call(id)
        return self
      elsif id.class == String && block_given? && txId == nil
        @j_del.java_method(:ack, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif id.class == String && txId.class == String && !block_given?
        @j_del.java_method(:ack, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(id,txId)
        return self
      elsif id.class == String && txId.class == String && block_given?
        @j_del.java_method(:ack, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,txId,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling ack(id,txId)"
    end

### - (`Object`) begin_tx(id = nil, headers = nil)

Raises:

- (`ArgumentError`)

    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 205

    def begin_tx(id=nil,headers=nil)
      if id.class == String && !block_given? && headers == nil
        @j_del.java_method(:beginTX, [Java::java.lang.String.java_class]).call(id)
        return self
      elsif id.class == String && block_given? && headers == nil
        @j_del.java_method(:beginTX, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif id.class == String && headers.class == Hash && !block_given?
        @j_del.java_method(:beginTX, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }])
        return self
      elsif id.class == String && headers.class == Hash && block_given?
        @j_del.java_method(:beginTX, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }],(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling begin_tx(id,headers)"
    end

### - (`Object`) close

Raises:

- (`ArgumentError`)

    34
    35
    36
    37
    38
    39
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 34

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

### - (`Object`) close_handler

Raises:

- (`ArgumentError`)

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

    def close_handler
      if block_given?
        @j_del.java_method(:closeHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxStomp::StompClientConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling close_handler()"
    end

### - (`Object`) commit(id = nil, headers = nil)

Raises:

- (`ArgumentError`)

    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 226

    def commit(id=nil,headers=nil)
      if id.class == String && !block_given? && headers == nil
        @j_del.java_method(:commit, [Java::java.lang.String.java_class]).call(id)
        return self
      elsif id.class == String && block_given? && headers == nil
        @j_del.java_method(:commit, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif id.class == String && headers.class == Hash && !block_given?
        @j_del.java_method(:commit, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }])
        return self
      elsif id.class == String && headers.class == Hash && block_given?
        @j_del.java_method(:commit, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class]).call(id,Hash[headers.map { |k,v| [k,v] }],(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling commit(id,headers)"
    end

### - (`Object`) connection_dropped_handler

Raises:

- (`ArgumentError`)

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

    def connection_dropped_handler
      if block_given?
        @j_del.java_method(:connectionDroppedHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxStomp::StompClientConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling connection_dropped_handler()"
    end

### - (`Object`) disconnect(frame = nil)

Raises:

- (`ArgumentError`)

    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 268

    def disconnect(frame=nil)
      if !block_given? && frame == nil
        @j_del.java_method(:disconnect, []).call()
        return self
      elsif block_given? && frame == nil
        @j_del.java_method(:disconnect, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif frame.class == Hash && !block_given?
        @j_del.java_method(:disconnect, [Java::IoVertxExtStomp::Frame.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(frame)))
        return self
      elsif frame.class == Hash && block_given?
        @j_del.java_method(:disconnect, [Java::IoVertxExtStomp::Frame.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(frame)),(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling disconnect(frame)"
    end

### - (`Object`) error_handler

Raises:

- (`ArgumentError`)

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

    def error_handler
      if block_given?
        @j_del.java_method(:errorHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling error_handler()"
    end

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) nack(id = nil, txId = nil)

Raises:

- (`ArgumentError`)

    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 312

    def nack(id=nil,txId=nil)
      if id.class == String && !block_given? && txId == nil
        @j_del.java_method(:nack, [Java::java.lang.String.java_class]).call(id)
        return self
      elsif id.class == String && block_given? && txId == nil
        @j_del.java_method(:nack, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif id.class == String && txId.class == String && !block_given?
        @j_del.java_method(:nack, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(id,txId)
        return self
      elsif id.class == String && txId.class == String && block_given?
        @j_del.java_method(:nack, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,txId,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling nack(id,txId)"
    end

### - (`Object`) ping_handler

Raises:

- (`ArgumentError`)

    193
    194
    195
    196
    197
    198
    199
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 193

    def ping_handler
      if block_given?
        @j_del.java_method(:pingHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxStomp::StompClientConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling ping_handler()"
    end

### - (`Object`) received_frame_handler

Raises:

- (`ArgumentError`)

    335
    336
    337
    338
    339
    340
    341
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 335

    def received_frame_handler
      if block_given?
        @j_del.java_method(:receivedFrameHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling received_frame_handler()"
    end

### - (`Object`) send(param_1 = nil, param_2 = nil, param_3 = nil)

Raises:

- (`ArgumentError`)

    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 77

    def send(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == Hash && !block_given? && param_2 == nil && param_3 == nil
        @j_del.java_method(:send, [Java::IoVertxExtStomp::Frame.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(param_1)))
        return self
      elsif param_1.class == Hash && param_2.class.method_defined?(:j_del) && !block_given? && param_3 == nil
        @j_del.java_method(:send, [Java::JavaUtil::Map.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(Hash[param_1.map { |k,v| [k,v] }],param_2.j_del)
        return self
      elsif param_1.class == String && param_2.class.method_defined?(:j_del) && !block_given? && param_3 == nil
        @j_del.java_method(:send, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1,param_2.j_del)
        return self
      elsif param_1.class == Hash && block_given? && param_2 == nil && param_3 == nil
        @j_del.java_method(:send, [Java::IoVertxExtStomp::Frame.java_class,Java::IoVertxCore::Handler.java_class]).call(Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(param_1)),(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif param_1.class == Hash && param_2.class.method_defined?(:j_del) && block_given? && param_3 == nil
        @j_del.java_method(:send, [Java::JavaUtil::Map.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(Hash[param_1.map { |k,v| [k,v] }],param_2.j_del,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif param_1.class == String && param_2.class.method_defined?(:j_del) && block_given? && param_3 == nil
        @j_del.java_method(:send, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,param_2.j_del,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif param_1.class == String && param_2.class == Hash && param_3.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:send, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1,Hash[param_2.map { |k,v| [k,v] }],param_3.j_del)
        return self
      elsif param_1.class == String && param_2.class == Hash && param_3.class.method_defined?(:j_del) && block_given?
        @j_del.java_method(:send, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,Hash[param_2.map { |k,v| [k,v] }],param_3.j_del,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling send(param_1,param_2,param_3)"
    end

### - (`Object`) server

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 41

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

### - (`Object`) session

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) subscribe(param_1 = nil, param_2 = nil, param_3 = nil)

Raises:

- (`ArgumentError`)

    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 123

    def subscribe(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && block_given? && param_2 == nil && param_3 == nil
        return @j_del.java_method(:subscribe, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
      elsif param_1.class == String && param_2.class == Proc && block_given? && param_3 == nil
        return @j_del.java_method(:subscribe, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,(Proc.new { |event| param_2.call(event != nil ? JSON.parse(event.toJson.encode) : nil) }),(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
      elsif param_1.class == String && param_2.class == Hash && block_given? && param_3 == nil
        return @j_del.java_method(:subscribe, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,Hash[param_2.map { |k,v| [k,v] }],(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
      elsif param_1.class == String && param_2.class == Hash && param_3.class == Proc && block_given?
        return @j_del.java_method(:subscribe, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class,Java::IoVertxCore::Handler.java_class]).call(param_1,Hash[param_2.map { |k,v| [k,v] }],(Proc.new { |event| param_3.call(event != nil ? JSON.parse(event.toJson.encode) : nil) }),(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling subscribe(param_1,param_2,param_3)"
    end

### - (`Object`) unsubscribe(destination = nil, headers = nil)

Raises:

- (`ArgumentError`)

    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 141

    def unsubscribe(destination=nil,headers=nil)
      if destination.class == String && !block_given? && headers == nil
        @j_del.java_method(:unsubscribe, [Java::java.lang.String.java_class]).call(destination)
        return self
      elsif destination.class == String && block_given? && headers == nil
        @j_del.java_method(:unsubscribe, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      elsif destination.class == String && headers.class == Hash && !block_given?
        @j_del.java_method(:unsubscribe, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class]).call(destination,Hash[headers.map { |k,v| [k,v] }])
        return self
      elsif destination.class == String && headers.class == Hash && block_given?
        @j_del.java_method(:unsubscribe, [Java::java.lang.String.java_class,Java::JavaUtil::Map.java_class,Java::IoVertxCore::Handler.java_class]).call(destination,Hash[headers.map { |k,v| [k,v] }],(Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling unsubscribe(destination,headers)"
    end

### - (`Object`) version

Raises:

- (`ArgumentError`)

    26
    27
    28
    29
    30
    31
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 26

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

### - (`Object`) writing_frame_handler

Raises:

- (`ArgumentError`)

    349
    350
    351
    352
    353
    354
    355
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_client_connection.rb', line 349

    def writing_frame_handler
      if block_given?
        @j_del.java_method(:writingFrameHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event != nil ? JSON.parse(event.toJson.encode) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling writing_frame_handler()"
    end