Class List Method List File List

# Class: VertxShell::Process

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

## Instance Method Summary (collapse)

- - (Object) exit_code
- - (Object) get_session
- - (Object) get_tty
- - (Process) initialize(j_del) constructor
  A new instance of Process.
- - (Boolean) interrupt?
- - (Object) j_del
- - (Object) resume(foreground = nil)
- - (Object) run(foregraound = nil)
- - (Object) set_session(session = nil)
- - (Object) set_tty(tty = nil)
- - (Object) status
- - (Object) suspend
- - (Object) terminate
- - (Object) terminated_handler
- - (Object) to_background
- - (Object) to_foreground

## Constructor Details

### - (`Process`) initialize(j_del)

Returns a new instance of Process

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

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) exit_code

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) get_session

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) get_tty

Raises:

- (`ArgumentError`)

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

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

### - (`Boolean`) interrupt?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

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

Raises:

- (`ArgumentError`)

    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/process.rb', line 113

    def resume(foreground=nil)
      if !block_given? && foreground == nil
        return @j_del.java_method(:resume, []).call()
      elsif (foreground.class == TrueClass || foreground.class == FalseClass) && !block_given?
        return @j_del.java_method(:resume, [Java::boolean.java_class]).call(foreground)
      elsif block_given? && foreground == nil
        return @j_del.java_method(:resume, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
      elsif (foreground.class == TrueClass || foreground.class == FalseClass) && block_given?
        return @j_del.java_method(:resume, [Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(foreground,Proc.new { yield })
      end
      raise ArgumentError, "Invalid arguments when calling resume(foreground)"
    end

### - (`Object`) run(foregraound = nil)

Raises:

- (`ArgumentError`)

    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/process.rb', line 86

    def run(foregraound=nil)
      if !block_given? && foregraound == nil
        return @j_del.java_method(:run, []).call()
      elsif (foregraound.class == TrueClass || foregraound.class == FalseClass) && !block_given?
        return @j_del.java_method(:run, [Java::boolean.java_class]).call(foregraound)
      elsif block_given? && foregraound == nil
        return @j_del.java_method(:run, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
      elsif (foregraound.class == TrueClass || foregraound.class == FalseClass) && block_given?
        return @j_del.java_method(:run, [Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(foregraound,Proc.new { yield })
      end
      raise ArgumentError, "Invalid arguments when calling run(foregraound)"
    end

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

Raises:

- (`ArgumentError`)

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

    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`)

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

    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`)

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

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

### - (`Object`) suspend

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) terminate

Raises:

- (`ArgumentError`)

    139
    140
    141
    142
    143
    144
    145
    146
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/process.rb', line 139

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

### - (`Object`) terminated_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) to_background

Raises:

- (`ArgumentError`)

    150
    151
    152
    153
    154
    155
    156
    157
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/process.rb', line 150

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

### - (`Object`) to_foreground

Raises:

- (`ArgumentError`)

    161
    162
    163
    164
    165
    166
    167
    168
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/process.rb', line 161

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