Class: VertxServiceDiscovery::ServiceExporter
- Inherits:
-
Object
- Object
- VertxServiceDiscovery::ServiceExporter
show all
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb
Overview
The service exporter 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 exporter is one side of a service discovery bridge.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Class Method Details
+ (Boolean) accept?(obj)
23
24
25
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 23
def @@j_api_type.accept?(obj)
obj.class == ServiceExporter
end
|
+ (Object) j_api_type
32
33
34
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 32
def self.j_api_type
@@j_api_type
end
|
+ (Object) j_class
35
36
37
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 35
def self.j_class
Java::IoVertxServicediscoverySpi::ServiceExporter.java_class
end
|
+ (Object) unwrap(obj)
29
30
31
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 29
def @@j_api_type.unwrap(obj)
obj.j_del
end
|
+ (Object) wrap(obj)
26
27
28
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 26
def @@j_api_type.wrap(obj)
ServiceExporter.new(obj)
end
|
Instance Method Details
- (void) close(closeHandler) { ... }
This method returns an undefined value.
Close the exporter
59
60
61
62
63
64
65
66
67
68
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 59
def close
if true
return @j_del.java_method(:close, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(nil) unless !block_given? }))
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling close()"
end
end
|
- (void) init(vertx, publisher, configuration, future)
This method returns an undefined value.
Starts the exporter.
45
46
47
48
49
50
51
52
53
54
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 45
def init(*args)
if args[0].class.method_defined?(:j_del) && args[1].class.method_defined?(:j_del) && args[2].class == Hash && args[3].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::Promise.java_class]).call(args[0].j_del,args[1].j_del,::Vertx::Util::Utils.to_json_object(args[2]),args[3].j_del)
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling init(#{args[0]},#{args[1]},#{args[2]},#{args[3]})"
end
end
|
- (void) onPublish(record)
This method returns an undefined value.
Notify a new record has been published, the record's registration can be used to uniquely
identify the record
103
104
105
106
107
108
109
110
111
112
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 103
def on_publish(*args)
if args[0].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(args[0])))
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling on_publish(#{args[0]})"
end
end
|
- (void) onUnpublish(id)
This method returns an undefined value.
Notify an existing record has been removed
73
74
75
76
77
78
79
80
81
82
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 73
def on_unpublish(*args)
if args[0].class == String && !block_given?
return @j_del.java_method(:onUnpublish, [Java::java.lang.String.java_class]).call(args[0])
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling on_unpublish(#{args[0]})"
end
end
|
- (void) onUpdate(record)
This method returns an undefined value.
Notify an existing record has been updated, the record's registration can be used to uniquely
identify the record
88
89
90
91
92
93
94
95
96
97
|
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-service-discovery/service_exporter.rb', line 88
def on_update(*args)
if args[0].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(args[0])))
end
if defined?(super)
super
else
raise ArgumentError, "Invalid arguments when calling on_update(#{args[0]})"
end
end
|