Class: VertxStomp::StompServerHandler

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb

Overview

STOMP server handler implements the behavior of the STOMP server when a specific event occurs. For instance, if let customize the behavior when specific STOMP frames arrives or when a connection is closed. This class has been designed to let you customize the server behavior. The default implementation is compliant with the STOMP specification. In this default implementation, not acknowledge frames are dropped.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


29
30
31
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 29

def @@j_api_type.accept?(obj)
  obj.class == StompServerHandler
end

+ (::VertxStomp::StompServerHandler) create(vertx)

Creates an instance of VertxStomp::StompServerHandler using the default (compliant) implementation.

Parameters:

Returns:



207
208
209
210
211
212
213
214
215
216
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 207

def self.create(*args)
  if args[0].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(args[0].j_del),::VertxStomp::StompServerHandler)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create(#{args[0]})"
  end
end

+ (Object) j_api_type



38
39
40
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 38

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



41
42
43
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 41

def self.j_class
  Java::IoVertxExtStomp::StompServerHandler.java_class
end

+ (Object) unwrap(obj)



35
36
37
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 35

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



32
33
34
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 32

def @@j_api_type.wrap(obj)
  StompServerHandler.new(obj)
end

Instance Method Details

- (self) abortHandler(handler) { ... }

Configures the action to execute when a ABORT frame is received.

Yields:

  • the handler

Returns:

  • (self)


48
49
50
51
52
53
54
55
56
57
58
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 48

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

- (self) ackHandler(handler) { ... }

Configures the action to execute when a ACK frame is received.

Yields:

  • the handler

Returns:

  • (self)


397
398
399
400
401
402
403
404
405
406
407
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 397

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

- (self) authProvider(handler)

Configures the to be used to authenticate the user.

Parameters:

Returns:

  • (self)


192
193
194
195
196
197
198
199
200
201
202
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 192

def auth_provider(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    @j_del.java_method(:authProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(args[0].j_del)
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling auth_provider(#{args[0]})"
  end
end

- (self) beginHandler(handler) { ... }

Configures the action to execute when a BEGIN frame is received.

Yields:

  • the handler

Returns:

  • (self)


484
485
486
487
488
489
490
491
492
493
494
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 484

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

- (self) bridge(options)

Configures the STOMP server to act as a bridge with the Vert.x event bus.

Parameters:

  • options (Hash{String => Object})
    the configuration options

Returns:

  • (self)


469
470
471
472
473
474
475
476
477
478
479
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 469

def bridge(*args)
  if args[0].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(args[0])))
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling bridge(#{args[0]})"
  end
end

- (self) closeHandler(handler) { ... }

Configures the action to execute when a connection with the client is closed.

Yields:

  • the handler

Returns:

  • (self)


382
383
384
385
386
387
388
389
390
391
392
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 382

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

- (self) commitHandler(handler) { ... }

Configures the action to execute when a COMMIT frame is received.

Yields:

  • the handler

Returns:

  • (self)


294
295
296
297
298
299
300
301
302
303
304
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 294

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

- (self) connectHandler(handler) { ... }

Configures the action to execute when a CONNECT frame is received.

Yields:

  • the handler

Returns:

  • (self)


367
368
369
370
371
372
373
374
375
376
377
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 367

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

- (self) destinationFactory(factory)

Configures the DestinationFactory used to create Destination objects.

Parameters:

Returns:

  • (self)


77
78
79
80
81
82
83
84
85
86
87
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 77

def destination_factory(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    @j_del.java_method(:destinationFactory, [Java::IoVertxExtStomp::DestinationFactory.java_class]).call(args[0].j_del)
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling destination_factory(#{args[0]})"
  end
end

- (self) disconnectHandler(handler) { ... }

Configures the action to execute when a DISCONNECT frame is received.

Yields:

  • the handler

Returns:

  • (self)


261
262
263
264
265
266
267
268
269
270
271
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 261

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

- (::VertxStomp::Destination) getDestination(destination)

Gets the destination with the given name.

Parameters:

  • destination (String)
    the destination

Returns:



63
64
65
66
67
68
69
70
71
72
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 63

def get_destination(*args)
  if args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getDestination, [Java::java.lang.String.java_class]).call(args[0]),::VertxStomp::Destination)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_destination(#{args[0]})"
  end
end

- (Array<::VertxStomp::Destination>) getDestinations

Returns the list of destination managed by the STOMP server. Don't forget the STOMP interprets destination as opaque Strings.

Returns:

  • (Array<::VertxStomp::Destination>)
    the list of destination managed by the STOMP server. Don't forget the STOMP interprets destination as opaque Strings.


425
426
427
428
429
430
431
432
433
434
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 425

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_destinations()"
  end
end

- (::VertxStomp::Destination) getOrCreateDestination(destination)

Gets a Destination object if existing, or create a new one. The creation is delegated to the DestinationFactory.

Parameters:

  • destination (String)
    the destination

Returns:



339
340
341
342
343
344
345
346
347
348
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 339

def get_or_create_destination(*args)
  if args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getOrCreateDestination, [Java::java.lang.String.java_class]).call(args[0]),::VertxStomp::Destination)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_or_create_destination(#{args[0]})"
  end
end

- (::VertxAuthCommon::User) getUserBySession(session)

Provides for authorization matches on a destination level, this will return the User created by the .

Parameters:

  • session (String)
    session ID for the server connection.

Returns:



309
310
311
312
313
314
315
316
317
318
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 309

def get_user_by_session(*args)
  if args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getUserBySession, [Java::java.lang.String.java_class]).call(args[0]),::VertxAuthCommon::User)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling get_user_by_session(#{args[0]})"
  end
end

- (void) handle(event)

This method returns an undefined value.

Something has happened, so handle it.

Parameters:



353
354
355
356
357
358
359
360
361
362
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 353

def handle(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:handle, [Java::IoVertxExtStomp::ServerFrame.java_class]).call(args[0].j_del)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling handle(#{args[0]})"
  end
end

- (self) nackHandler(handler) { ... }

Configures the action to execute when a NACK frame is received.

Yields:

  • the handler

Returns:

  • (self)


246
247
248
249
250
251
252
253
254
255
256
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 246

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

- (self) onAck(connection, subscribe, messages)

Method called by single message (client-individual policy) or a set of message (client policy) are acknowledged. Implementations must call the handler configured using #on_ack_handler.

Parameters:

  • connection (::VertxStomp::StompServerConnection)
    the connection
  • subscribe (Hash{String => Object})
    the SUBSCRIBE frame
  • messages (Array<Hash{String => Object}>)
    the acknowledge messages

Returns:

  • (self)


279
280
281
282
283
284
285
286
287
288
289
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 279

def on_ack(*args)
  if args[0].class.method_defined?(:j_del) && args[1].class == Hash && args[2].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(args[0].j_del,Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(args[1])),args[2].map { |element| Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(element)) })
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling on_ack(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) onAckHandler(handler) { ... }

Configures the action to execute when messages are acknowledged.

Yields:

  • the handler

Returns:

  • (self)


143
144
145
146
147
148
149
150
151
152
153
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 143

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

- (self) onAuthenticationRequest(connection, login, passcode, handler) { ... }

Called when the client connects to a server requiring authentication. It invokes the configured using #auth_provider.

Parameters:

Yields:

  • handler receiving the authentication result

Returns:

  • (self)


225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 225

def on_authentication_request(*args)
  if args[0].class.method_defined?(:j_del) && args[1].class == String && args[2].class == String && true
    if (block_given?)
      @j_del.java_method(:onAuthenticationRequest, [Java::IoVertxExtStomp::StompServerConnection.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:onAuthenticationRequest, [Java::IoVertxExtStomp::StompServerConnection.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0].j_del,args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling on_authentication_request(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (void) onClose(connection)

This method returns an undefined value.

Called when the connection is closed. This method executes a default behavior and must calls the configured #close_handler if any.

Parameters:



440
441
442
443
444
445
446
447
448
449
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 440

def on_close(*args)
  if args[0].class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:onClose, [Java::IoVertxExtStomp::StompServerConnection.java_class]).call(args[0].j_del)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling on_close(#{args[0]})"
  end
end

- (self) onNack(connection, subscribe, messages)

Method called by single message (client-individual policy) or a set of message (client policy) are not acknowledged. Not acknowledgment can result from a NACK frame or from a timeout (no ACK frame received in a given time. Implementations must call the handler configured using #on_nack_handler.

Parameters:

  • connection (::VertxStomp::StompServerConnection)
    the connection
  • subscribe (Hash{String => Object})
    the SUBSCRIBE frame
  • messages (Array<Hash{String => Object}>)
    the acknowledge messages

Returns:

  • (self)


113
114
115
116
117
118
119
120
121
122
123
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 113

def on_nack(*args)
  if args[0].class.method_defined?(:j_del) && args[1].class == Hash && args[2].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(args[0].j_del,Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(args[1])),args[2].map { |element| Java::IoVertxExtStomp::Frame.new(::Vertx::Util::Utils.to_json_object(element)) })
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling on_nack(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) onNackHandler(handler) { ... }

Configures the action to execute when messages are not acknowledged.

Yields:

  • the handler

Returns:

  • (self)


412
413
414
415
416
417
418
419
420
421
422
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 412

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

- (self) pingHandler(handler) { ... }

Allows customizing the action to do when the server needs to send a `PING` to the client. By default it send a frame containing EOL (specification). However, you can customize this and send another frame. However, be aware that this may requires a custom client.

The handler will only be called if the connection supports heartbeats.

Yields:

  • the action to execute when a `PING` needs to be sent.

Returns:

  • (self)


162
163
164
165
166
167
168
169
170
171
172
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 162

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

- (self) receivedFrameHandler(handler) { ... }

Configures a handler that get notified when a STOMP frame is received by the server. This handler can be used for logging, debugging or ad-hoc behavior.

Yields:

  • the handler

Returns:

  • (self)


93
94
95
96
97
98
99
100
101
102
103
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 93

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

- (self) sendHandler(handler) { ... }

Configures the action to execute when a SEND frame is received.

Yields:

  • the handler

Returns:

  • (self)


454
455
456
457
458
459
460
461
462
463
464
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 454

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

- (self) stompHandler(handler) { ... }

Configures the action to execute when a STOMP frame is received.

Yields:

  • the handler

Returns:

  • (self)


128
129
130
131
132
133
134
135
136
137
138
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 128

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

- (self) subscribeHandler(handler) { ... }

Configures the action to execute when a SUBSCRIBE frame is received.

Yields:

  • the handler

Returns:

  • (self)


323
324
325
326
327
328
329
330
331
332
333
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 323

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

- (self) unsubscribeHandler(handler) { ... }

Configures the action to execute when a UNSUBSCRIBE frame is received.

Yields:

  • the handler

Returns:

  • (self)


177
178
179
180
181
182
183
184
185
186
187
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/stomp_server_handler.rb', line 177

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