Class List Method List File List

# Class: VertxShell::Shell

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

## Overview

An interactive session between a consumer and a shell.

## Instance Method Summary (collapse)

- - (void) close
  Close the shell.
- - (::VertxShell::Job) create_job(param_1 = nil)
  See #create_job.
- - (::VertxShell::JobController) job_controller
  @return the shell's job controller.
- - (::VertxShell::Session) session
  @return the current shell session.

## Instance Method Details

### - (`void`) close

This method returns an undefined value.

Close the shell.

Raises:

- (`ArgumentError`)

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

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

### - (`::VertxShell::Job`) createJob(line) - (`::VertxShell::Job`) createJob(line)

See #create_job

Overloads:

- - (`::VertxShell::Job`) createJob(line)

  Parameters:

  - line (`Array<::VertxShell::CliToken>`) —
    the command line creating this job
- - (`::VertxShell::Job`) createJob(line)

  Parameters:

  - line (`String`)

Returns:

- (`::VertxShell::Job`)

Raises:

- (`ArgumentError`)

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

    def create_job(param_1=nil)
      if param_1.class == Array && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:createJob, [Java::JavaUtil::List.java_class]).call(param_1.map { |element| element.j_del }),::VertxShell::Job)
      elsif param_1.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:createJob, [Java::java.lang.String.java_class]).call(param_1),::VertxShell::Job)
      end
      raise ArgumentError, "Invalid arguments when calling create_job(param_1)"
    end

### - (`::VertxShell::JobController`) job_controller

@return the shell's job controller

Returns:

- (`::VertxShell::JobController`)

Raises:

- (`ArgumentError`)

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

    def job_controller
      if !block_given?
        if @cached_job_controller != nil
          return @cached_job_controller
        end
        return @cached_job_controller = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:jobController, []).call(),::VertxShell::JobController)
      end
      raise ArgumentError, "Invalid arguments when calling job_controller()"
    end

### - (`::VertxShell::Session`) session

@return the current shell session

Returns:

- (`::VertxShell::Session`)

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    53
    54
    55
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/shell.rb', line 47

    def session
      if !block_given?
        if @cached_session != nil
          return @cached_session
        end
        return @cached_session = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:session, []).call(),::VertxShell::Session)
      end
      raise ArgumentError, "Invalid arguments when calling session()"
    end