Class List Method List File List

# Class: VertxStomp::StompServerHandler

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

## Class Method Summary (collapse)

- + (Object) create(vertx = nil)

## Instance Method Summary (collapse)

- - (Object) abort_handler
- - (Object) ack_handler
- - (Object) auth_provider(handler = nil)
- - (Object) begin_handler
- - (Object) bridge(options = nil)
- - (Object) close_handler
- - (Object) commit_handler
- - (Object) connect_handler
- - (Object) destination_factory(factory = nil)
- - (Object) disconnect_handler
- - (Object) get_destination(destination = nil)
- - (Object) get_destinations
- - (Object) get_or_create_destination(destination = nil)
- - (Object) handle(arg0 = nil)
- - (StompServerHandler) initialize(j_del) constructor
  A new instance of StompServerHandler.
- - (Object) j_del
- - (Object) nack_handler
- - (Object) on_ack(connection = nil, subscribe = nil, messages = nil)
- - (Object) on_ack_handler
- - (Object) on_authentication_request(server = nil, login = nil, passcode = nil)
- - (Object) on_close(connection = nil)
- - (Object) on_nack(connection = nil, subscribe = nil, messages = nil)
- - (Object) on_nack_handler
- - (Object) ping_handler
- - (Object) received_frame_handler
- - (Object) send_handler
- - (Object) stomp_handler
- - (Object) subscribe_handler
- - (Object) unsubscribe_handler

## Constructor Details

### - (`StompServerHandler`) initialize(j_del)

Returns a new instance of StompServerHandler

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

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

Raises:

- (`ArgumentError`)

    38
    39
    40
    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 38

    def self.create(vertx=nil)
      if vertx.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtStomp::StompServerHandler.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxStomp::StompServerHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx)"
    end

## Instance Method Details

### - (`Object`) abort_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) ack_handler

Raises:

- (`ArgumentError`)

    168
    169
    170
    171
    172
    173
    174
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 168

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

### - (`Object`) auth_provider(handler = nil)

Raises:

- (`ArgumentError`)

    202
    203
    204
    205
    206
    207
    208
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 202

    def auth_provider(handler=nil)
      if handler.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:authProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(handler.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling auth_provider(handler)"
    end

### - (`Object`) begin_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) bridge(options = nil)

Raises:

- (`ArgumentError`)

    310
    311
    312
    313
    314
    315
    316
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 310

    def bridge(options=nil)
      if options.class == Hash && !block_given?
        @j_del.java_method(:bridge, [Java::IoVertxExtStomp::BridgeOptions.java_class]).call(Java::IoVertxExtStomp::BridgeOptions.new(::Vertx::Util::Utils.to_json_object(options)))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling bridge(options)"
    end

### - (`Object`) close_handler

Raises:

- (`ArgumentError`)

    108
    109
    110
    111
    112
    113
    114
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 108

    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::StompServerConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling close_handler()"
    end

### - (`Object`) commit_handler

Raises:

- (`ArgumentError`)

    128
    129
    130
    131
    132
    133
    134
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 128

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

### - (`Object`) connect_handler

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    64
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 58

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

### - (`Object`) destination_factory(factory = nil)

Raises:

- (`ArgumentError`)

    300
    301
    302
    303
    304
    305
    306
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 300

    def destination_factory(factory=nil)
      if factory.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:destinationFactory, [Java::IoVertxExtStomp::DestinationFactory.java_class]).call(factory.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling destination_factory(factory)"
    end

### - (`Object`) disconnect_handler

Raises:

- (`ArgumentError`)

    158
    159
    160
    161
    162
    163
    164
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 158

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

### - (`Object`) get_destination(destination = nil)

Raises:

- (`ArgumentError`)

    219
    220
    221
    222
    223
    224
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 219

    def get_destination(destination=nil)
      if destination.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getDestination, [Java::java.lang.String.java_class]).call(destination),::VertxStomp::Destination)
      end
      raise ArgumentError, "Invalid arguments when calling get_destination(destination)"
    end

### - (`Object`) get_destinations

Raises:

- (`ArgumentError`)

    210
    211
    212
    213
    214
    215
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 210

    def get_destinations
      if !block_given?
        return @j_del.java_method(:getDestinations, []).call().to_a.map { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxStomp::Destination) }
      end
      raise ArgumentError, "Invalid arguments when calling get_destinations()"
    end

### - (`Object`) get_or_create_destination(destination = nil)

Raises:

- (`ArgumentError`)

    291
    292
    293
    294
    295
    296
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 291

    def get_or_create_destination(destination=nil)
      if destination.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getOrCreateDestination, [Java::java.lang.String.java_class]).call(destination),::VertxStomp::Destination)
      end
      raise ArgumentError, "Invalid arguments when calling get_or_create_destination(destination)"
    end

### - (`Object`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 29

    def handle(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxExtStomp::ServerFrame.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(arg0)"
    end

### - (`Object`) j_del

    24
    25
    26
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 24

    def j_del
      @j_del
    end

### - (`Object`) nack_handler

Raises:

- (`ArgumentError`)

    178
    179
    180
    181
    182
    183
    184
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 178

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

### - (`Object`) on_ack(connection = nil, subscribe = nil, messages = nil)

Raises:

- (`ArgumentError`)

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

    def on_ack(connection=nil,subscribe=nil,messages=nil)
      if connection.class.method_defined?(:j_del) && subscribe.class == Hash && messages.class == Array && !block_given?
        @j_del.java_method(:onAck, [Java::IoVertxExtStomp::StompServerConnection.java_class,Java::IoVertxExtStomp::Frame.java_class,Java::JavaUtil::List.java_class]).call(connection.j_del,Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(subscribe)),messages.map { |element| Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(element)) })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling on_ack(connection,subscribe,messages)"
    end

### - (`Object`) on_ack_handler

Raises:

- (`ArgumentError`)

    256
    257
    258
    259
    260
    261
    262
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 256

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

### - (`Object`) on_authentication_request(server = nil, login = nil, passcode = nil)

Raises:

- (`ArgumentError`)

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

    def on_authentication_request(server=nil,login=nil,passcode=nil)
      if server.class.method_defined?(:j_del) && login.class == String && passcode.class == String && block_given?
        @j_del.java_method(:onAuthenticationRequest, [Java::IoVertxExtStomp::StompServer.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(server.j_del,login,passcode,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling on_authentication_request(server,login,passcode)"
    end

### - (`Object`) on_close(connection = nil)

Raises:

- (`ArgumentError`)

    119
    120
    121
    122
    123
    124
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 119

    def on_close(connection=nil)
      if connection.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:onClose, [Java::IoVertxExtStomp::StompServerConnection.java_class]).call(connection.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling on_close(connection)"
    end

### - (`Object`) on_nack(connection = nil, subscribe = nil, messages = nil)

Raises:

- (`ArgumentError`)

    246
    247
    248
    249
    250
    251
    252
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 246

    def on_nack(connection=nil,subscribe=nil,messages=nil)
      if connection.class.method_defined?(:j_del) && subscribe.class == Hash && messages.class == Array && !block_given?
        @j_del.java_method(:onNack, [Java::IoVertxExtStomp::StompServerConnection.java_class,Java::IoVertxExtStomp::Frame.java_class,Java::JavaUtil::List.java_class]).call(connection.j_del,Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(subscribe)),messages.map { |element| Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(element)) })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling on_nack(connection,subscribe,messages)"
    end

### - (`Object`) on_nack_handler

Raises:

- (`ArgumentError`)

    266
    267
    268
    269
    270
    271
    272
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 266

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

### - (`Object`) ping_handler

Raises:

- (`ArgumentError`)

    280
    281
    282
    283
    284
    285
    286
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 280

    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::StompServerConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling ping_handler()"
    end

### - (`Object`) received_frame_handler

Raises:

- (`ArgumentError`)

    48
    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 48

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

### - (`Object`) send_handler

Raises:

- (`ArgumentError`)

    98
    99
    100
    101
    102
    103
    104
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 98

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

### - (`Object`) stomp_handler

Raises:

- (`ArgumentError`)

    68
    69
    70
    71
    72
    73
    74
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 68

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

### - (`Object`) subscribe_handler

Raises:

- (`ArgumentError`)

    78
    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 78

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

### - (`Object`) unsubscribe_handler

Raises:

- (`ArgumentError`)

    88
    89
    90
    91
    92
    93
    94
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-stomp/stomp_server_handler.rb', line 88

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