Class List Method List File List

# Class: VertxShell::Term

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

## Instance Method Summary (collapse)

- - (Object) close
- - (Object) close_handler
- - (Object) echo(text = nil)
- - (Object) height
- - (Term) initialize(j_del) constructor
  A new instance of Term.
- - (Object) interrupt_handler(handler = nil)
- - (Object) j_del
- - (Object) last_accessed_time
- - (Object) readline(prompt = nil, lineHandler = nil)
- - (Object) resizehandler
- - (Object) set_session(session = nil)
- - (Object) stdin_handler
- - (Object) suspend_handler(handler = nil)
- - (Object) type
- - (Object) width
- - (Object) write(data = nil)

## Constructor Details

### - (`Term`) initialize(j_del)

Returns a new instance of Term

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

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) close

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) close_handler

Raises:

- (`ArgumentError`)

    131
    132
    133
    134
    135
    136
    137
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term.rb', line 131

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

### - (`Object`) echo(text = nil)

Raises:

- (`ArgumentError`)

    79
    80
    81
    82
    83
    84
    85
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term.rb', line 79

    def echo(text=nil)
      if text.class == String && !block_given?
        @j_del.java_method(:echo, [Java::java.lang.String.java_class]).call(text)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling echo(text)"
    end

### - (`Object`) height

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) interrupt_handler(handler = nil)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) last_accessed_time

Raises:

- (`ArgumentError`)

    70
    71
    72
    73
    74
    75
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term.rb', line 70

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

### - (`Object`) readline(prompt = nil, lineHandler = nil)

Raises:

- (`ArgumentError`)

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

    def readline(prompt=nil,lineHandler=nil)
      if prompt.class == String && block_given? && lineHandler == nil
        return @j_del.java_method(:readline, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(prompt,(Proc.new { |event| yield(event) }))
      elsif prompt.class == String && lineHandler.class == Proc && block_given?
        return @j_del.java_method(:readline, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class,Java::IoVertxCore::Handler.java_class]).call(prompt,(Proc.new { |event| lineHandler.call(event) }),(Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::VertxShell::Completion)) }))
      end
      raise ArgumentError, "Invalid arguments when calling readline(prompt,lineHandler)"
    end

### - (`Object`) resizehandler

Raises:

- (`ArgumentError`)

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

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

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

Raises:

- (`ArgumentError`)

    89
    90
    91
    92
    93
    94
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-shell/term.rb', line 89

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

### - (`Object`) stdin_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) suspend_handler(handler = nil)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) type

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) width

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) write(data = nil)

Raises:

- (`ArgumentError`)

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

    def write(data=nil)
      if data.class == String && !block_given?
        @j_del.java_method(:write, [Java::java.lang.String.java_class]).call(data)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write(data)"
    end