Class List Method List File List

# Class: VertxServiceDiscovery::ServiceExporter

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

## Instance Method Summary (collapse)

- - (Object) close
- - (Object) init(vertx = nil, publisher = nil, configuration = nil, future = nil)
- - (ServiceExporter) initialize(j_del) constructor
  A new instance of ServiceExporter.
- - (Object) j_del
- - (Object) on_publish(record = nil)
- - (Object) on_unpublish(id = nil)
- - (Object) on_update(record = nil)

## Constructor Details

### - (`ServiceExporter`) initialize(j_del)

Returns a new instance of ServiceExporter

    13
    14
    15
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_exporter.rb', line 13

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) close

Raises:

- (`ArgumentError`)

    65
    66
    67
    68
    69
    70
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_exporter.rb', line 65

    def close
      if block_given?
        return @j_del.java_method(:close, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

### - (`Object`) init(vertx = nil, publisher = nil, configuration = nil, future = nil)

Raises:

- (`ArgumentError`)

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

    def init(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(:init, [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 init(vertx,publisher,configuration,future)"
    end

### - (`Object`) j_del

    18
    19
    20
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_exporter.rb', line 18

    def j_del
      @j_del
    end

### - (`Object`) on_publish(record = nil)

Raises:

- (`ArgumentError`)

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

    def on_publish(record=nil)
      if record.class == Hash && !block_given?
        return @j_del.java_method(:onPublish, [Java::IoVertxServicediscovery::Record.java_class]).call(Java::IoVertxServicediscovery::Record.new(::Vertx::Util::Utils.to_json_object(record)))
      end
      raise ArgumentError, "Invalid arguments when calling on_publish(record)"
    end

### - (`Object`) on_unpublish(id = nil)

Raises:

- (`ArgumentError`)

    56
    57
    58
    59
    60
    61
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_exporter.rb', line 56

    def on_unpublish(id=nil)
      if id.class == String && !block_given?
        return @j_del.java_method(:onUnpublish, [Java::java.lang.String.java_class]).call(id)
      end
      raise ArgumentError, "Invalid arguments when calling on_unpublish(id)"
    end

### - (`Object`) on_update(record = nil)

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-service-discovery/service_exporter.rb', line 47

    def on_update(record=nil)
      if record.class == Hash && !block_given?
        return @j_del.java_method(:onUpdate, [Java::IoVertxServicediscovery::Record.java_class]).call(Java::IoVertxServicediscovery::Record.new(::Vertx::Util::Utils.to_json_object(record)))
      end
      raise ArgumentError, "Invalid arguments when calling on_update(record)"
    end