Class List Method List File List

# Class: VertxShell::Job

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

## Instance Method Summary (collapse)

- - (Object) id
- - (Job) initialize(j_del) constructor
  A new instance of Job.
- - (Boolean) interrupt?
- - (Object) j_del
- - (Object) last_stopped
- - (Object) line
- - (Object) process
- - (Object) resume(foreground = nil)
- - (Object) run
- - (Object) set_session(session = nil)
- - (Object) set_tty(tty = nil)
- - (Object) status
- - (Object) status_update_handler
- - (Object) suspend
- - (Object) terminate
- - (Object) to_background
- - (Object) to_foreground

## Constructor Details

### - (`Job`) initialize(j_del)

Returns a new instance of Job

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

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) id

Raises:

- (`ArgumentError`)

    23
    24
    25
    26
    27
    28
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 23

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

### - (`Boolean`) interrupt?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    91
    92
    93
    94
    95
    96
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 91

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) last_stopped

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) line

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) process

Raises:

- (`ArgumentError`)

    145
    146
    147
    148
    149
    150
    151
    152
    153
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 145

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

### - (`Object`) resume(foreground = nil)

Raises:

- (`ArgumentError`)

    100
    101
    102
    103
    104
    105
    106
    107
    108
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 100

    def resume(foreground=nil)
      if !block_given? && foreground == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:resume, []).call(),::VertxShell::Job)
      elsif (foreground.class == TrueClass || foreground.class == FalseClass) && !block_given?
        @j_del.java_method(:resume, [Java::boolean.java_class]).call(foreground)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling resume(foreground)"
    end

### - (`Object`) run

Raises:

- (`ArgumentError`)

    82
    83
    84
    85
    86
    87
    88
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 82

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

### - (`Object`) set_session(session = nil)

Raises:

- (`ArgumentError`)

    63
    64
    65
    66
    67
    68
    69
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 63

    def set_session(session=nil)
      if session.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:setSession, [Java::IoVertxExtShellSession::Session.java_class]).call(session.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_session(session)"
    end

### - (`Object`) set_tty(tty = nil)

Raises:

- (`ArgumentError`)

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

    def set_tty(tty=nil)
      if tty.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:setTty, [Java::IoVertxExtShellTerm::Tty.java_class]).call(tty.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_tty(tty)"
    end

### - (`Object`) status

Raises:

- (`ArgumentError`)

    30
    31
    32
    33
    34
    35
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 30

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

### - (`Object`) status_update_handler

Raises:

- (`ArgumentError`)

    73
    74
    75
    76
    77
    78
    79
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 73

    def status_update_handler
      if block_given?
        @j_del.java_method(:statusUpdateHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event.name.intern) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling status_update_handler()"
    end

### - (`Object`) suspend

Raises:

- (`ArgumentError`)

    129
    130
    131
    132
    133
    134
    135
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 129

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

### - (`Object`) terminate

Raises:

- (`ArgumentError`)

    138
    139
    140
    141
    142
    143
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 138

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

### - (`Object`) to_background

Raises:

- (`ArgumentError`)

    111
    112
    113
    114
    115
    116
    117
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/job.rb', line 111

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

### - (`Object`) to_foreground

Raises:

- (`ArgumentError`)

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

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