Class List Method List File List

# Class: Vertx::WebSocketStream

Inherits:
  Object
  - Object
  - Vertx::WebSocketStream
  show all
Includes:
  ReadStream
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_stream.rb

## Instance Method Summary (collapse)

- - (Object) end_handler
- - (Object) exception_handler
- - (Object) handler
- - (WebSocketStream) initialize(j_del) constructor
  A new instance of WebSocketStream.
- - (Object) j_del
- - (Object) pause
- - (Object) resume

## Constructor Details

### - (`WebSocketStream`) initialize(j_del)

Returns a new instance of WebSocketStream

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_stream.rb', line 17

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) end_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) exception_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) j_del

    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_stream.rb', line 22

    def j_del
      @j_del
    end

### - (`Object`) pause

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) resume

Raises:

- (`ArgumentError`)

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

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