Class: VertxShell::ShellService
- Inherits:
-
Object
- Object
- VertxShell::ShellService
- Defined in:
- /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell_service.rb
Overview
The shell service, provides a remotely accessible shell available via Telnet or SSH according to the
Hash configuration.
The shell service will expose commands using CommandResolver on the classpath and
the shared command registry for the Vert.x instance.
Class Method Summary (collapse)
-
+ (::VertxShell::ShellService) create(vertx = nil, options = nil)
Create a new shell service.
Instance Method Summary (collapse)
-
- (::VertxShell::ShellServer) server
@return 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
+ (::VertxShell::ShellService) create(vertx = nil, options = nil)
Create a new shell service.
26 27 28 29 30 31 32 33 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell_service.rb', line 26 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,options)" end |
Instance Method Details
- (::VertxShell::ShellServer) server
@return the shell server
47 48 49 50 51 52 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell_service.rb', line 47 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.
37 38 39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell_service.rb', line 37 def start if !block_given? return @j_del.java_method(:start, []).call() elsif block_given? return @j_del.java_method(:start, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) 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.
56 57 58 59 60 61 62 63 |
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell_service.rb', line 56 def stop if !block_given? return @j_del.java_method(:stop, []).call() elsif block_given? return @j_del.java_method(:stop, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil) })) end raise ArgumentError, "Invalid arguments when calling stop()" end |