Class List Method List File List

# Class: VertxShell::JobController

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

## Instance Method Summary (collapse)

- - (Object) close
- - (Object) create_job(process = nil, line = nil)
- - (Object) foreground_job
- - (Object) get_job(id = nil)
- - (JobController) initialize(j_del) constructor
  A new instance of JobController.
- - (Object) j_del
- - (Object) jobs

## Constructor Details

### - (`JobController`) initialize(j_del)

Returns a new instance of JobController

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) close

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    60
    61
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 54

    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 { yield })
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

### - (`Object`) create_job(process = nil, line = nil)

Raises:

- (`ArgumentError`)

    45
    46
    47
    48
    49
    50
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 45

    def create_job(process=nil,line=nil)
      if process.class.method_defined?(:j_del) && line.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:createJob, [Java::IoVertxExtShellSystem::Process.java_class,Java::java.lang.String.java_class]).call(process.j_del,line),::VertxShell::Job)
      end
      raise ArgumentError, "Invalid arguments when calling create_job(process,line)"
    end

### - (`Object`) foreground_job

Raises:

- (`ArgumentError`)

    19
    20
    21
    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 19

    def foreground_job
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:foregroundJob, []).call(),::VertxShell::Job)
      end
      raise ArgumentError, "Invalid arguments when calling foreground_job()"
    end

### - (`Object`) get_job(id = nil)

Raises:

- (`ArgumentError`)

    35
    36
    37
    38
    39
    40
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 35

    def get_job(id=nil)
      if id.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getJob, [Java::int.java_class]).call(id),::VertxShell::Job)
      end
      raise ArgumentError, "Invalid arguments when calling get_job(id)"
    end

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job_controller.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) jobs

Raises:

- (`ArgumentError`)

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

    def jobs
      if !block_given?
        return ::Vertx::Util::Utils.to_set(@j_del.java_method(:jobs, []).call()).map! { |elt| ::Vertx::Util::Utils.safe_create(elt,::VertxShell::Job) }
      end
      raise ArgumentError, "Invalid arguments when calling jobs()"
    end