Class: VertxShell::ShellService
- Inherits:
-
Object
- Object
- VertxShell::ShellService
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.rb
Overview
The shell service, provides a remotely accessible shell available via Telnet or SSH according to the
=> Object} configuration.
The shell service will expose commands using CommandResolver on the classpath and
the shared command registry for the Vert.x instance.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxShell::ShellService) create(vertx = nil, options = nil)
Create a new shell service.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (::VertxShell::ShellServer) server
The shell server.
-
- (void) start { ... }
Start the shell service, this is an asynchronous start.
-
- (void) stop { ... }
Stop the shell service, this is an asynchronous start.
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-shell/shell_service.rb', line 23 def @@j_api_type.accept?(obj) obj.class == ShellService end |
+ (::VertxShell::ShellService) create(vertx = nil, options = nil)
Create a new shell service.
42 43 44 45 46 47 48 49 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.rb', line 42 def self.create(vertx=nil,=nil) if vertx.class.method_defined?(:j_del) && !block_given? && == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShell::ShellService.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxShell::ShellService) elsif vertx.class.method_defined?(:j_del) && .class == Hash && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShell::ShellService.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtShell::ShellServiceOptions.java_class]).call(vertx.j_del,Java::IoVertxExtShell::ShellServiceOptions.new(::Vertx::Util::Utils.to_json_object())),::VertxShell::ShellService) end raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{})" end |
+ (Object) j_api_type
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.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-shell/shell_service.rb', line 35 def self.j_class Java::IoVertxExtShell::ShellService.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-shell/shell_service.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-shell/shell_service.rb', line 26 def @@j_api_type.wrap(obj) ShellService.new(obj) end |
Instance Method Details
- (::VertxShell::ShellServer) server
Returns the shell server
62 63 64 65 66 67 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.rb', line 62 def server if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:server, []).call(),::VertxShell::ShellServer) end raise ArgumentError, "Invalid arguments when calling server()" end |
- (void) start { ... }
This method returns an undefined value.
Start the shell service, this is an asynchronous start.
53 54 55 56 57 58 59 60 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.rb', line 53 def start if !block_given? return @j_del.java_method(:start, []).call() elsif true return @j_del.java_method(:start, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) } unless !block_given?)) end raise ArgumentError, "Invalid arguments when calling start()" end |
- (void) stop { ... }
This method returns an undefined value.
Stop the shell service, this is an asynchronous start.
71 72 73 74 75 76 77 78 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-shell/shell_service.rb', line 71 def stop if !block_given? return @j_del.java_method(:stop, []).call() elsif true return @j_del.java_method(:stop, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) } unless !block_given?)) end raise ArgumentError, "Invalid arguments when calling stop()" end |