Class List Method List File List

# Class: VertxShell::TermServer

Inherits:
  Object
  - Object
  - VertxShell::TermServer
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb

## Class Method Summary (collapse)

- + (Object) create_http_term_server(param_1 = nil, param_2 = nil, param_3 = nil)
- + (Object) create_ssh_term_server(vertx = nil, options = nil)
- + (Object) create_telnet_term_server(vertx = nil, options = nil)

## Instance Method Summary (collapse)

- - (Object) actual_port
- - (Object) auth_provider(provider = nil)
- - (Object) close
- - (TermServer) initialize(j_del) constructor
  A new instance of TermServer.
- - (Object) j_del
- - (Object) listen
- - (Object) term_handler

## Constructor Details

### - (`TermServer`) initialize(j_del)

Returns a new instance of TermServer

    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 12

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create_http_term_server(param_1 = nil, param_2 = nil, param_3 = nil)

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 58

    def self.create_http_term_server(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class.method_defined?(:j_del) && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createHttpTermServer, [Java::IoVertxCore::Vertx.java_class]).call(param_1.j_del),::VertxShell::TermServer)
      elsif param_1.class.method_defined?(:j_del) && param_2.class == Hash && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createHttpTermServer, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtShellTerm::HttpTermOptions.java_class]).call(param_1.j_del,Java::IoVertxExtShellTerm::HttpTermOptions.new(::Vertx::Util::Utils.to_json_object(param_2))),::VertxShell::TermServer)
      elsif param_1.class.method_defined?(:j_del) && param_2.class.method_defined?(:j_del) && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createHttpTermServer, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtWeb::Router.java_class]).call(param_1.j_del,param_2.j_del),::VertxShell::TermServer)
      elsif param_1.class.method_defined?(:j_del) && param_2.class.method_defined?(:j_del) && param_3.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createHttpTermServer, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtWeb::Router.java_class,Java::IoVertxExtShellTerm::HttpTermOptions.java_class]).call(param_1.j_del,param_2.j_del,Java::IoVertxExtShellTerm::HttpTermOptions.new(::Vertx::Util::Utils.to_json_object(param_3))),::VertxShell::TermServer)
      end
      raise ArgumentError, "Invalid arguments when calling create_http_term_server(param_1,param_2,param_3)"
    end

### + (`Object`) create_ssh_term_server(vertx = nil, options = nil)

Raises:

- (`ArgumentError`)

    24
    25
    26
    27
    28
    29
    30
    31
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 24

    def self.create_ssh_term_server(vertx=nil,options=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createSSHTermServer, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxShell::TermServer)
      elsif vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createSSHTermServer, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtShellTerm::SSHTermOptions.java_class]).call(vertx.j_del,Java::IoVertxExtShellTerm::SSHTermOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxShell::TermServer)
      end
      raise ArgumentError, "Invalid arguments when calling create_ssh_term_server(vertx,options)"
    end

### + (`Object`) create_telnet_term_server(vertx = nil, options = nil)

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 36

    def self.create_telnet_term_server(vertx=nil,options=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createTelnetTermServer, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxShell::TermServer)
      elsif vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtShellTerm::TermServer.java_method(:createTelnetTermServer, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtShellTerm::TelnetTermOptions.java_class]).call(vertx.j_del,Java::IoVertxExtShellTerm::TelnetTermOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxShell::TermServer)
      end
      raise ArgumentError, "Invalid arguments when calling create_telnet_term_server(vertx,options)"
    end

## Instance Method Details

### - (`Object`) actual_port

Raises:

- (`ArgumentError`)

    109
    110
    111
    112
    113
    114
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 109

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

### - (`Object`) auth_provider(provider = nil)

Raises:

- (`ArgumentError`)

    86
    87
    88
    89
    90
    91
    92
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 86

    def auth_provider(provider=nil)
      if provider.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:authProvider, [Java::IoVertxExtAuth::AuthProvider.java_class]).call(provider.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling auth_provider(provider)"
    end

### - (`Object`) close

Raises:

- (`ArgumentError`)

    118
    119
    120
    121
    122
    123
    124
    125
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 118

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

### - (`Object`) j_del

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 17

    def j_del
      @j_del
    end

### - (`Object`) listen

Raises:

- (`ArgumentError`)

    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 96

    def listen
      if !block_given?
        @j_del.java_method(:listen, []).call()
        return self
      elsif block_given?
        @j_del.java_method(:listen, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxShell::TermServer) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling listen()"
    end

### - (`Object`) term_handler

Raises:

- (`ArgumentError`)

    75
    76
    77
    78
    79
    80
    81
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term_server.rb', line 75

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