Class: VertxServiceDiscovery::ServiceImporter

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_importer.rb

Overview

The service importer allows integrate other discovery technologies with the Vert.x service discovery. It maps entries from another technology to a and maps to a publication in this other technology. The importer is one side of a service discovery bridge.

Instance Method Summary (collapse)

Instance Method Details

- (void) start(vertx = nil, publisher = nil, configuration = nil, future = nil)

This method returns an undefined value.

Starts the bridge.

Parameters:

  • vertx (::Vertx::Vertx) (defaults to: nil)
    the vertx instance
  • publisher (::VertxServiceDiscovery::ServicePublisher) (defaults to: nil)
    the service discovery instance
  • configuration (Hash{String => Object}) (defaults to: nil)
    the bridge configuration if any
  • future (::Vertx::Future) (defaults to: nil)
    a future on which the bridge must report the completion of the starting

Raises:

  • (ArgumentError)


27
28
29
30
31
32
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_importer.rb', line 27

def start(vertx=nil,publisher=nil,configuration=nil,future=nil)
  if vertx.class.method_defined?(:j_del) && publisher.class.method_defined?(:j_del) && configuration.class == Hash && future.class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:start, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxServicediscoverySpi::ServicePublisher.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Future.java_class]).call(vertx.j_del,publisher.j_del,::Vertx::Util::Utils.to_json_object(configuration),future.j_del)
  end
  raise ArgumentError, "Invalid arguments when calling start(vertx,publisher,configuration,future)"
end

- (void) stop(vertx = nil, publisher = nil, future = nil)

This method returns an undefined value.

Stops the bridge.

Parameters:

Raises:

  • (ArgumentError)


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

def stop(vertx=nil,publisher=nil,future=nil)
  if vertx.class.method_defined?(:j_del) && publisher.class.method_defined?(:j_del) && future.class.method_defined?(:j_del) && !block_given?
    return @j_del.java_method(:stop, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxServicediscoverySpi::ServicePublisher.java_class,Java::IoVertxCore::Future.java_class]).call(vertx.j_del,publisher.j_del,future.j_del)
  end
  raise ArgumentError, "Invalid arguments when calling stop(vertx,publisher,future)"
end