Class: VertxConsul::Watch

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (::VertxConsul::Watch) events(event = nil, vertx = nil, options = nil)

Parameters:

  • event (String) (defaults to: nil)
  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

69
70
71
72
73
74
75
76
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 69

def self.events(event=nil,vertx=nil,options=nil)
  if event.class == String && vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:events, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class]).call(event,vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::EventList))
  elsif event.class == String && vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:events, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(event,vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::EventList))
  end
  raise ArgumentError, "Invalid arguments when calling events(#{event},#{vertx},#{options})"
end

+ (::VertxConsul::Watch) key(key = nil, vertx = nil, options = nil)

Parameters:

  • key (String) (defaults to: nil)
  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

22
23
24
25
26
27
28
29
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 22

def self.key(key=nil,vertx=nil,options=nil)
  if key.class == String && vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:key, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class]).call(key,vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValue))
  elsif key.class == String && vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:key, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(key,vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValue))
  end
  raise ArgumentError, "Invalid arguments when calling key(#{key},#{vertx},#{options})"
end

+ (::VertxConsul::Watch) key_prefix(keyPrefix = nil, vertx = nil, options = nil)

Parameters:

  • keyPrefix (String) (defaults to: nil)
  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

34
35
36
37
38
39
40
41
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 34

def self.key_prefix(keyPrefix=nil,vertx=nil,options=nil)
  if keyPrefix.class == String && vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:keyPrefix, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class]).call(keyPrefix,vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValueList))
  elsif keyPrefix.class == String && vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:keyPrefix, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(keyPrefix,vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::KeyValueList))
  end
  raise ArgumentError, "Invalid arguments when calling key_prefix(#{keyPrefix},#{vertx},#{options})"
end

+ (::VertxConsul::Watch) nodes(vertx = nil, options = nil)

Parameters:

  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

80
81
82
83
84
85
86
87
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 80

def self.nodes(vertx=nil,options=nil)
  if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:nodes, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::NodeList))
  elsif vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:nodes, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::NodeList))
  end
  raise ArgumentError, "Invalid arguments when calling nodes(#{vertx},#{options})"
end

+ (::VertxConsul::Watch) service(service = nil, vertx = nil, options = nil)

Parameters:

  • service (String) (defaults to: nil)
  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

57
58
59
60
61
62
63
64
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 57

def self.service(service=nil,vertx=nil,options=nil)
  if service.class == String && vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:service, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class]).call(service,vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceEntryList))
  elsif service.class == String && vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:service, [Java::java.lang.String.java_class,Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(service,vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceEntryList))
  end
  raise ArgumentError, "Invalid arguments when calling service(#{service},#{vertx},#{options})"
end

+ (::VertxConsul::Watch) services(vertx = nil, options = nil)

Parameters:

  • vertx (::Vertx::Vertx) (defaults to: nil)
  • options (Hash) (defaults to: nil)

Returns:

Raises:

  • (ArgumentError)

45
46
47
48
49
50
51
52
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 45

def self.services(vertx=nil,options=nil)
  if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:services, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
  elsif vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
    return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtConsul::Watch.java_method(:services, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtConsul::ConsulClientOptions.java_class]).call(vertx.j_del,Java::IoVertxExtConsul::ConsulClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxConsul::Watch,::Vertx::Util::data_object_type(Java::IoVertxExtConsul::ServiceList))
  end
  raise ArgumentError, "Invalid arguments when calling services(#{vertx},#{options})"
end

Instance Method Details

- (self) set_handler { ... }

Yields:

Returns:

  • (self)

Raises:

  • (ArgumentError)

90
91
92
93
94
95
96
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 90

def set_handler
  if block_given?
    @j_del.java_method(:setHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxConsul::WatchResult, nil)) }))
    return self
  end
  raise ArgumentError, "Invalid arguments when calling set_handler()"
end

- (self) start

Returns:

  • (self)

Raises:

  • (ArgumentError)

98
99
100
101
102
103
104
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 98

def start
  if !block_given?
    @j_del.java_method(:start, []).call()
    return self
  end
  raise ArgumentError, "Invalid arguments when calling start()"
end

- (void) stop

This method returns an undefined value.

Raises:

  • (ArgumentError)

106
107
108
109
110
111
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-consul/watch.rb', line 106

def stop
  if !block_given?
    return @j_del.java_method(:stop, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling stop()"
end