Class: Vertx::HttpFrame

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_frame.rb

Overview

An HTTP/2 frame.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


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

def @@j_api_type.accept?(obj)
  obj.class == HttpFrame
end

+ (Object) j_api_type



27
28
29
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_frame.rb', line 27

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



30
31
32
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_frame.rb', line 30

def self.j_class
  Java::IoVertxCoreHttp::HttpFrame.java_class
end

+ (Object) unwrap(obj)



24
25
26
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_frame.rb', line 24

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



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

def @@j_api_type.wrap(obj)
  HttpFrame.new(obj)
end

Instance Method Details

- (Fixnum) flags

Returns the 8-bit flags specific to the frame

Returns:

  • (Fixnum)
    the 8-bit flags specific to the frame

Raises:

  • (ArgumentError)


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

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

- (::Vertx::Buffer) payload

Returns the frame payload

Returns:

Raises:

  • (ArgumentError)


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

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

- (Fixnum) type

Returns the 8-bit type of the frame

Returns:

  • (Fixnum)
    the 8-bit type of the frame

Raises:

  • (ArgumentError)


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

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