Class List Method List File List

# Class: VertxServiceDiscovery::DiscoveryBridge

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

## Overview

Discovery bridge 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. Each bridge can decide which services needs to be imported and exported. It can also implement only on way.

## Instance Method Summary (collapse)

- - (void) start(vertx = nil, discovery = nil, configuration = nil, future = nil)
  Starts the bridge.
- - (void) stop(vertx = nil, discovery = nil, future = nil)
  Stops the bridge.

## Instance Method Details

### - (`void`) start(vertx = nil, discovery = nil, configuration = nil, future = nil)

This method returns an undefined value.

Starts the bridge.

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the vertx instance
- discovery (`::VertxServiceDiscovery::ServiceDiscovery`) (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 process

Raises:

- (`ArgumentError`)

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

    def start(vertx=nil,discovery=nil,configuration=nil,future=nil)
      if vertx.class.method_defined?(:j_del) && discovery.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::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::IoVertxCoreJson::JsonObject.java_class,Java::IoVertxCore::Future.java_class]).call(vertx.j_del,discovery.j_del,::Vertx::Util::Utils.to_json_object(configuration),future.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling start(vertx,discovery,configuration,future)"
    end

### - (`void`) stop(vertx = nil, discovery = nil, future = nil)

This method returns an undefined value.

Stops the bridge.

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the vertx instance
- discovery (`::VertxServiceDiscovery::ServiceDiscovery`) (defaults to: `nil`) —
  the service discovery instance
- future (`::Vertx::Future`) (defaults to: `nil`) —
  the future on which the bridge must report the completion of the stopping process

Raises:

- (`ArgumentError`)

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

    def stop(vertx=nil,discovery=nil,future=nil)
      if vertx.class.method_defined?(:j_del) && discovery.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::IoVertxServicediscovery::ServiceDiscovery.java_class,Java::IoVertxCore::Future.java_class]).call(vertx.j_del,discovery.j_del,future.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling stop(vertx,discovery,future)"
    end