Class List Method List File List

# Class: Vertx::WebSocketFrame

Inherits:
  Object
  - Object
  - Vertx::WebSocketFrame
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_frame.rb

## Class Method Summary (collapse)

- + (Object) binary_frame(data = nil, isFinal = nil)
- + (Object) continuation_frame(data = nil, isFinal = nil)
- + (Object) text_frame(str = nil, isFinal = nil)

## Instance Method Summary (collapse)

- - (Boolean) binary?
- - (Object) binary_data
- - (Boolean) continuation?
- - (Boolean) final?
- - (WebSocketFrame) initialize(j_del) constructor
  A new instance of WebSocketFrame.
- - (Object) j_del
- - (Boolean) text?
- - (Object) text_data

## Constructor Details

### - (`WebSocketFrame`) initialize(j_del)

Returns a new instance of WebSocketFrame

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

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) binary_frame(data = nil, isFinal = nil)

Raises:

- (`ArgumentError`)

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

    def self.binary_frame(data=nil,isFinal=nil)
      if data.class.method_defined?(:j_del) && (isFinal.class == TrueClass || isFinal.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreHttp::WebSocketFrame.java_method(:binaryFrame, [Java::IoVertxCoreBuffer::Buffer.java_class,Java::boolean.java_class]).call(data.j_del,isFinal),::Vertx::WebSocketFrame)
      end
      raise ArgumentError, "Invalid arguments when calling binary_frame(data,isFinal)"
    end

### + (`Object`) continuation_frame(data = nil, isFinal = nil)

Raises:

- (`ArgumentError`)

    48
    49
    50
    51
    52
    53
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_frame.rb', line 48

    def self.continuation_frame(data=nil,isFinal=nil)
      if data.class.method_defined?(:j_del) && (isFinal.class == TrueClass || isFinal.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreHttp::WebSocketFrame.java_method(:continuationFrame, [Java::IoVertxCoreBuffer::Buffer.java_class,Java::boolean.java_class]).call(data.j_del,isFinal),::Vertx::WebSocketFrame)
      end
      raise ArgumentError, "Invalid arguments when calling continuation_frame(data,isFinal)"
    end

### + (`Object`) text_frame(str = nil, isFinal = nil)

Raises:

- (`ArgumentError`)

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

    def self.text_frame(str=nil,isFinal=nil)
      if str.class == String && (isFinal.class == TrueClass || isFinal.class == FalseClass) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxCoreHttp::WebSocketFrame.java_method(:textFrame, [Java::java.lang.String.java_class,Java::boolean.java_class]).call(str,isFinal),::Vertx::WebSocketFrame)
      end
      raise ArgumentError, "Invalid arguments when calling text_frame(str,isFinal)"
    end

## Instance Method Details

### - (`Boolean`) binary?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) binary_data

Raises:

- (`ArgumentError`)

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

    def binary_data
      if !block_given?
        if @cached_binary_data != nil
          return @cached_binary_data
        end
        return @cached_binary_data = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:binaryData, []).call(),::Vertx::Buffer)
      end
      raise ArgumentError, "Invalid arguments when calling binary_data()"
    end

### - (`Boolean`) continuation?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

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

### - (`Boolean`) final?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    96
    97
    98
    99
    100
    101
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_frame.rb', line 96

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Boolean`) text?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) text_data

Raises:

- (`ArgumentError`)

    76
    77
    78
    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/web_socket_frame.rb', line 76

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